From 02cfb9da86271acff49531220880a615558fc1f1 Mon Sep 17 00:00:00 2001 From: MarekZegare4 Date: Tue, 23 Jun 2026 11:24:06 +0200 Subject: [PATCH] fix(ui): hide GPS status icon when GPS setting is disabled The status-bar GPS icon appeared whenever the board had GPS hardware, even if the user had turned GPS off in settings, implying a search that wasn't actually happening. Co-Authored-By: Claude Sonnet 4.6 --- examples/companion_radio/ui-new/UITask.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 01c382ec..363a19bb 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -493,10 +493,11 @@ class HomeScreen : public UIScreen { } // GPS fix status — boxed (lit) when the receiver has a valid fix, plain - // glyph while searching. Hidden entirely on boards with no GPS hardware, - // so profiles without one don't carry a permanently-empty slot. + // glyph while searching. Hidden entirely on boards with no GPS hardware + // and while the GPS setting itself is off, so it doesn't sit there as a + // permanently-empty slot or imply a search that isn't happening. LocationProvider* loc = _sensors ? _sensors->getLocationProvider() : nullptr; - if (loc) { + if (loc && _node_prefs && _node_prefs->gps_enabled) { int gX = leftmostX - ind - ind_gap; if (loc->isValid()) drawBoxedIcon(display, gX, ind, ind_h, ICON_GPS); else drawSlotIcon(display, gX, ind, ind_h, ICON_GPS);