Fix layout and double enabling of event GPS-raw

master
BartS23 2022-01-10 20:37:22 +01:00 committed by Romek
parent 7905d3cffc
commit 8053de3307
1 changed files with 9 additions and 5 deletions

View File

@ -110,12 +110,16 @@ function onGPS(fix) {
layout.maidenhead.label = "Maidenhead: "+maidenhead; layout.maidenhead.label = "Maidenhead: "+maidenhead;
layout.render(); layout.render();
} else { } else {
if (listenerGPSraw == 0) { if (fix.satelites != lastFix.satelites) {
Bangle.on('GPS-raw', onGPSraw); layout.clear(layout.sat);
listenerGPSraw = 1;
}
layout.sat.label = fix.satellites; layout.sat.label = fix.satellites;
layout.render(layout.sat);
}
if (SATinView != lastFix.SATinView) {
layout.clear(layout.progress);
layout.progress.label = "in view: " + SATinView; layout.progress.label = "in view: " + SATinView;
layout.render(layout.progress);
}
} }
//layout.render(); //layout.render();