Skip to content

Commit

Permalink
Merge pull request #2986 from ticalc-travis/health_daily_movement_2
Browse files Browse the repository at this point in the history
Fix health daily movement graph again :-)
  • Loading branch information
gfwilliams authored Aug 29, 2023
2 parents 918be9e + fde449c commit e40b799
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/health/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions apps/health/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion apps/health/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e40b799

Please sign in to comment.