Fix daily summaries for 31st of the month - https://github.com/espruino/BangleApps/pull/2986
parent
646a4b010d
commit
b75c2751c9
|
|
@ -28,3 +28,4 @@
|
||||||
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
|
0.27: Fix typo in daily summary graph code causing graph not to load
|
||||||
|
Fix daily summaries for 31st of the month
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ function stepsPerHour() {
|
||||||
function stepsPerDay() {
|
function stepsPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
current_selection = "stepsPerDay";
|
current_selection = "stepsPerDay";
|
||||||
var data = new Uint16Array(31);
|
var data = new Uint16Array(32);
|
||||||
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.steps);
|
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.steps);
|
||||||
setButton(menuStepCount);
|
setButton(menuStepCount);
|
||||||
barChart(/*LANG*/"DAY", data);
|
barChart(/*LANG*/"DAY", data);
|
||||||
|
|
@ -72,8 +72,8 @@ function hrmPerHour() {
|
||||||
function hrmPerDay() {
|
function hrmPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
current_selection = "hrmPerDay";
|
current_selection = "hrmPerDay";
|
||||||
var data = new Uint16Array(31);
|
var data = new Uint16Array(32);
|
||||||
var cnt = new Uint8Array(31);
|
var cnt = new Uint8Array(32);
|
||||||
require("health").readDailySummaries(new Date(), h=>{
|
require("health").readDailySummaries(new Date(), h=>{
|
||||||
data[h.day]+=h.bpm;
|
data[h.day]+=h.bpm;
|
||||||
if (h.bpm) cnt[h.day]++;
|
if (h.bpm) cnt[h.day]++;
|
||||||
|
|
@ -100,8 +100,8 @@ function movementPerHour() {
|
||||||
function movementPerDay() {
|
function movementPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
current_selection = "movementPerDay";
|
current_selection = "movementPerDay";
|
||||||
var data = new Uint16Array(31);
|
var data = new Uint16Array(32);
|
||||||
var cnt = new Uint8Array(31);
|
var cnt = new Uint8Array(32);
|
||||||
require("health").readDailySummaries(new Date(), h=>{
|
require("health").readDailySummaries(new Date(), h=>{
|
||||||
data[h.day]+=h.movement;
|
data[h.day]+=h.movement;
|
||||||
cnt[h.day]++;
|
cnt[h.day]++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue