forked from FOSS/BangleApps
Merge pull request #2986 from ticalc-travis/health_daily_movement_2
Fix health daily movement graph again :-)master
commit
e40b7995ce
|
@ -27,3 +27,4 @@
|
||||||
movement graph in app is now an average, not sum
|
movement graph in app is now an average, not sum
|
||||||
fix 11pm slot for daily HRM
|
fix 11pm slot for daily HRM
|
||||||
0.26: Implement API for activity fetching
|
0.26: Implement API for activity fetching
|
||||||
|
0.27: Fix typo in daily summary graph code causing graph not to load
|
||||||
|
|
|
@ -89,7 +89,7 @@ function movementPerHour() {
|
||||||
var data = new Uint16Array(24);
|
var data = new Uint16Array(24);
|
||||||
var cnt = new Uint8Array(24);
|
var cnt = new Uint8Array(24);
|
||||||
require("health").readDay(new Date(), h=>{
|
require("health").readDay(new Date(), h=>{
|
||||||
data[h.hr]+=h.movement
|
data[h.hr]+=h.movement;
|
||||||
cnt[h.hr]++;
|
cnt[h.hr]++;
|
||||||
});
|
});
|
||||||
data.forEach((d,i)=>data[i] = d/cnt[i]);
|
data.forEach((d,i)=>data[i] = d/cnt[i]);
|
||||||
|
@ -103,8 +103,8 @@ function movementPerDay() {
|
||||||
var data = new Uint16Array(31);
|
var data = new Uint16Array(31);
|
||||||
var cnt = new Uint8Array(31);
|
var cnt = new Uint8Array(31);
|
||||||
require("health").readDailySummaries(new Date(), h=>{
|
require("health").readDailySummaries(new Date(), h=>{
|
||||||
data[h.hr]+=h.movement
|
data[h.day]+=h.movement;
|
||||||
cnt[h.hr]++;
|
cnt[h.day]++;
|
||||||
});
|
});
|
||||||
data.forEach((d,i)=>data[i] = d/cnt[i]);
|
data.forEach((d,i)=>data[i] = d/cnt[i]);
|
||||||
setButton(menuMovement);
|
setButton(menuMovement);
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"id": "health",
|
"id": "health",
|
||||||
"name": "Health Tracking",
|
"name": "Health Tracking",
|
||||||
"shortName": "Health",
|
"shortName": "Health",
|
||||||
"version": "0.26",
|
"version": "0.27",
|
||||||
"description": "Logs health data and provides an app to view it",
|
"description": "Logs health data and provides an app to view it",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"tags": "tool,system,health",
|
"tags": "tool,system,health",
|
||||||
|
|
Loading…
Reference in New Issue