diff --git a/apps/health/ChangeLog b/apps/health/ChangeLog index 6bc15be835..489715931e 100644 --- a/apps/health/ChangeLog +++ b/apps/health/ChangeLog @@ -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 diff --git a/apps/health/app.js b/apps/health/app.js index fdc69dd28d..3b615ff1d1 100644 --- a/apps/health/app.js +++ b/apps/health/app.js @@ -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); diff --git a/apps/health/metadata.json b/apps/health/metadata.json index 10c8268cbf..10a146bdd3 100644 --- a/apps/health/metadata.json +++ b/apps/health/metadata.json @@ -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",