[Health] Use var instead of let
parent
2508fd38ab
commit
1d3428321c
|
|
@ -46,7 +46,7 @@ function menuHRM() {
|
||||||
|
|
||||||
function stepsPerHour() {
|
function stepsPerHour() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(24);
|
var data = new Uint16Array(24);
|
||||||
require("health").readDay(new Date(), h=>data[h.hr]+=h.steps);
|
require("health").readDay(new Date(), h=>data[h.hr]+=h.steps);
|
||||||
g.clear(1);
|
g.clear(1);
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
@ -57,7 +57,7 @@ function stepsPerHour() {
|
||||||
|
|
||||||
function stepsPerDay() {
|
function stepsPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(31);
|
var data = new Uint16Array(31);
|
||||||
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.steps);
|
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.steps);
|
||||||
g.clear(1);
|
g.clear(1);
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
@ -68,8 +68,8 @@ function stepsPerDay() {
|
||||||
|
|
||||||
function hrmPerHour() {
|
function hrmPerHour() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(24);
|
var data = new Uint16Array(24);
|
||||||
let cnt = new Uint8Array(23);
|
var cnt = new Uint8Array(23);
|
||||||
require("health").readDay(new Date(), h=>{
|
require("health").readDay(new Date(), h=>{
|
||||||
data[h.hr]+=h.bpm;
|
data[h.hr]+=h.bpm;
|
||||||
if (h.bpm) cnt[h.hr]++;
|
if (h.bpm) cnt[h.hr]++;
|
||||||
|
|
@ -84,8 +84,8 @@ function hrmPerHour() {
|
||||||
|
|
||||||
function hrmPerDay() {
|
function hrmPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(31);
|
var data = new Uint16Array(31);
|
||||||
let cnt = new Uint8Array(31);
|
var cnt = new Uint8Array(31);
|
||||||
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,7 +100,7 @@ function hrmPerDay() {
|
||||||
|
|
||||||
function movementPerHour() {
|
function movementPerHour() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(24);
|
var data = new Uint16Array(24);
|
||||||
require("health").readDay(new Date(), h=>data[h.hr]+=h.movement);
|
require("health").readDay(new Date(), h=>data[h.hr]+=h.movement);
|
||||||
g.clear(1);
|
g.clear(1);
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
@ -111,7 +111,7 @@ function movementPerHour() {
|
||||||
|
|
||||||
function movementPerDay() {
|
function movementPerDay() {
|
||||||
E.showMessage(/*LANG*/"Loading...");
|
E.showMessage(/*LANG*/"Loading...");
|
||||||
let data = new Uint16Array(31);
|
var data = new Uint16Array(31);
|
||||||
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.movement);
|
require("health").readDailySummaries(new Date(), h=>data[h.day]+=h.movement);
|
||||||
g.clear(1);
|
g.clear(1);
|
||||||
Bangle.drawWidgets();
|
Bangle.drawWidgets();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue