gpstrek - Turn compass off when a fix is available

pull/2952/head
Martin Boonk 2023-08-06 20:49:16 +02:00
parent 56cc982cbc
commit 20cfa16a6c
1 changed files with 6 additions and 1 deletions

View File

@ -45,7 +45,12 @@ function onPulse(e){
}
function onGPS(fix) {
if(fix.fix) state.currentPos = fix;
if(fix.fix) {
state.currentPos = fix;
Bangle.setCompassPower(0, "gpstrek");
} else {
Bangle.setCompassPower(1, "gpstrek");
}
}
let radians = function(a) {