Update app.js

pull/668/head
nujw 2021-02-05 09:14:47 +13:00 committed by GitHub
parent cc47b51c1c
commit 7044a12c63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -360,6 +360,10 @@ function isLP() {
return(1);
}
function lpGetFix() {
onGPS(WIDGETS.gpsservice.gps_get_fix());
}
function setLpMode(on) {
if ( !lp ) return;
var s = WIDGETS.gpsservice.gps_get_settings();
@ -431,6 +435,9 @@ var lp = isLP(); // Low power GPS widget installed.
Bangle.setGPSPower(1);
onGPS(lf);
Bangle.on('GPS', onGPS);
if ( lp ) setInterval(lpGetFix, 1000);
else Bangle.on('GPS', onGPS);
setButtons();
setInterval(updateClock, 30000);