From fae839f86cf9ddd666bec9d64943a31d9c2e7b5b Mon Sep 17 00:00:00 2001 From: nujw Date: Fri, 5 Feb 2021 11:23:12 +1300 Subject: [PATCH] Update app.js --- apps/speedalt/app.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/speedalt/app.js b/apps/speedalt/app.js index 97e84548e..eac8d186c 100644 --- a/apps/speedalt/app.js +++ b/apps/speedalt/app.js @@ -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'; }