1
0
Fork 0

Update app.js

master
nujw 2021-02-05 11:55:25 +13:00 committed by GitHub
parent 0f8af3e8ec
commit c284a9c999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -209,8 +209,6 @@ function onGPS(fix) {
fix.time = new Date(); fix.time = new Date();
} }
if (fix.fix) lf = fix;
var m; var m;
var sp = '---'; var sp = '---';
@ -218,7 +216,9 @@ function onGPS(fix) {
var di = '---'; var di = '---';
var age = '---'; var age = '---';
if (lf.fix == 1 ) { if (fix.fix) {
lf = 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
@ -342,7 +342,7 @@ function startDraw(){
function stopDraw() { function stopDraw() {
canDraw=false; canDraw=false;
setLpMode(1); // on if (lf.fix) setLpMode(1); // on. Keep lp mode off until we have a first fix.
} }
function savSettings() { function savSettings() {