Update app.js

pull/668/head
nujw 2021-02-05 11:23:12 +13:00 committed by GitHub
parent 2e34b4f030
commit fae839f86c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -90,9 +90,11 @@ function drawFix(speed,units,sats,alt,alt_units,age,fix) {
drawWP();
//Sats
if ( fix ) drawSats('Sats:'+sats);
else drawSats('Age:'+age);
// if ( fix ) drawSats('Sats:'+sats);
// else drawSats('Age:'+age);
if ( age > 10 ) drawSats('Age:'+age);
else drawSats('Sats:'+sats);
g.reset();
g.drawImage(img,0,40);
@ -242,7 +244,9 @@ function onGPS(fix) {
if (isNaN(di)) di = 0;
// Age of last fix (secs)
age = Math.max(0,Math.round(getTime())-(lf.time.getTime()/1000));
//age = Math.max(0,Math.round(getTime())-(lf.time.getTime()/1000));
var time = formatTime(lf.time);
age = timeSince(time);
if ( age > 90 ) age = '>90';
}