mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user