1
0
Fork 0

Update app.js

master
nujw 2021-02-04 18:04:48 +13:00 committed by GitHub
parent 6500199663
commit fb3853ce38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -220,7 +220,7 @@ function onGPS(fix) {
// Speed // Speed
if ( settings.spd == 0 ) { if ( settings.spd == 0 ) {
m = require("locale").speed(lf.speed).match(/([0-9,\.]+)(.*)/); // regex splits numbers from units m = require("locale").speed(lf.speed).match(/([0-9,\.]+)(.*)/); // regex splits numbers from units
speed = m[1]; speed = parseFloat(m[1]);
settings.spd_unit = m[2]; settings.spd_unit = m[2];
} }
else { else {
@ -387,12 +387,10 @@ var SCREENACCESS = {
request:function(){ request:function(){
this.withApp=false; this.withApp=false;
stopDraw(); stopDraw();
clearWatch();
}, },
release:function(){ release:function(){
this.withApp=true; this.withApp=true;
startDraw(); startDraw();
setButtons();
} }
}; };
@ -414,4 +412,3 @@ onGPS(lf);
Bangle.on('GPS', onGPS); Bangle.on('GPS', onGPS);
setButtons(); setButtons();
setInterval(updateClock, 30000); setInterval(updateClock, 30000);