From 20cfa16a6c8561ed82eb6ce27aa87b638e19b9b5 Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Sun, 6 Aug 2023 20:49:16 +0200 Subject: [PATCH] gpstrek - Turn compass off when a fix is available --- apps/gpstrek/widget.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/gpstrek/widget.js b/apps/gpstrek/widget.js index 6887486bc..894dbde5a 100644 --- a/apps/gpstrek/widget.js +++ b/apps/gpstrek/widget.js @@ -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) {