Update app.js

pull/668/head
nujw 2021-02-05 10:31:26 +13:00 committed by GitHub
parent b3357b2efa
commit 569b08200c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -207,6 +207,10 @@ function onGPS(fix) {
fix.time = new Date();
}
print(fix.fix+' '+fix.alt);
if (fix.fix) lf = fix;
doFix();
@ -220,10 +224,8 @@ function doFix() {
var al = '---';
var di = '---';
var age = '---';
print(lf.fix+' '+lf.alt);
if (lf.fix == 1 ) {
if (lf.fix == 1 ) {
// Speed
if ( settings.spd == 0 ) {
m = require("locale").speed(lf.speed).match(/([0-9,\.]+)(.*)/); // regex splits numbers from units
@ -370,7 +372,7 @@ function setLpMode(on) {
s.gpsservice = true;
s.power_mode = (on)?'PSMOO':'SuperE';
print('[a] '+s.power_mode);
print('[b] '+s.power_mode);
WIDGETS.gpsservice.gps_set_settings(s);
WIDGETS.gpsservice.reload();