I have been testing the next iteration.
I have noticed that after I have hada fix that after swiping out of the clock_info back to say the battery display that the GPS gets powered on again.
My question is:
var timeout; // is this the same variable as
hide: function() {
Bangle.setGPSPower(0,"clkinfo");
Bangle.removeListener("GPS", onGPS);
if (this.timeout) {
clearTimeout(this.timeout); /// <<<< as the variable here ?
this.timeout = undefined;
}
resetLastFix();
}
I'm not 100% sure I understand how this.timeout gets defined in code at:
hide : function() {
Bangle.setHRMPower(0,"clkinfo");
Bangle.removeListener("HRM", hrmUpdateHandler);
if (this.timeout) {
clearTimeout(this.timeout);
this.timeout = undefined; ////// where does timeout get declared, just seems to spring into existance
}
hrm = 0;
},
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thanks for that, that worked.
I have been testing the next iteration.
I have noticed that after I have hada fix that after swiping out of the clock_info back to say the battery display that the GPS gets powered on again.
My question is:
I'm not 100% sure I understand how this.timeout gets defined in code at:
https://github.com/espruino/BangleApps/blob/master/apps/clock_info/lib.js
line 83