1
0
Fork 0

Merge pull request #2986 from ticalc-travis/health_daily_movement_2

Fix health daily movement graph again :-)
master
Gordon Williams 2023-08-29 09:40:12 +01:00 committed by GitHub
commit e40b7995ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -27,3 +27,4 @@
movement graph in app is now an average, not sum
fix 11pm slot for daily HRM
0.26: Implement API for activity fetching
0.27: Fix typo in daily summary graph code causing graph not to load

View File

@ -89,7 +89,7 @@ function movementPerHour() {
var data = new Uint16Array(24);
var cnt = new Uint8Array(24);
require("health").readDay(new Date(), h=>{
data[h.hr]+=h.movement
data[h.hr]+=h.movement;
cnt[h.hr]++;
});
data.forEach((d,i)=>data[i] = d/cnt[i]);
@ -103,8 +103,8 @@ function movementPerDay() {
var data = new Uint16Array(31);
var cnt = new Uint8Array(31);
require("health").readDailySummaries(new Date(), h=>{
data[h.hr]+=h.movement
cnt[h.hr]++;
data[h.day]+=h.movement;
cnt[h.day]++;
});
data.forEach((d,i)=>data[i] = d/cnt[i]);
setButton(menuMovement);

View File

@ -2,7 +2,7 @@
"id": "health",
"name": "Health Tracking",
"shortName": "Health",
"version": "0.26",
"version": "0.27",
"description": "Logs health data and provides an app to view it",
"icon": "app.png",
"tags": "tool,system,health",