mirror of https://github.com/espruino/BangleApps
Update app.js
parent
cc47b51c1c
commit
7044a12c63
|
@ -360,6 +360,10 @@ function isLP() {
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function lpGetFix() {
|
||||||
|
onGPS(WIDGETS.gpsservice.gps_get_fix());
|
||||||
|
}
|
||||||
|
|
||||||
function setLpMode(on) {
|
function setLpMode(on) {
|
||||||
if ( !lp ) return;
|
if ( !lp ) return;
|
||||||
var s = WIDGETS.gpsservice.gps_get_settings();
|
var s = WIDGETS.gpsservice.gps_get_settings();
|
||||||
|
@ -431,6 +435,9 @@ var lp = isLP(); // Low power GPS widget installed.
|
||||||
|
|
||||||
Bangle.setGPSPower(1);
|
Bangle.setGPSPower(1);
|
||||||
onGPS(lf);
|
onGPS(lf);
|
||||||
Bangle.on('GPS', onGPS);
|
|
||||||
|
if ( lp ) setInterval(lpGetFix, 1000);
|
||||||
|
else Bangle.on('GPS', onGPS);
|
||||||
|
|
||||||
setButtons();
|
setButtons();
|
||||||
setInterval(updateClock, 30000);
|
setInterval(updateClock, 30000);
|
||||||
|
|
Loading…
Reference in New Issue