mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 14:58:12 +00:00
refactor(trail): route gpsHasFix through ownPos/currentLocation
The last stray getLocationProvider/isValid duplicate (with its own ENV_INCLUDE_GPS guard). Fold it into ownPos so every GPS lookup in the nav screens goes through UITask::currentLocation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -218,15 +218,8 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
// True when the global SensorManager has a usable GPS fix.
|
||||
static bool gpsHasFix() {
|
||||
#if ENV_INCLUDE_GPS == 1
|
||||
LocationProvider* loc = sensors.getLocationProvider();
|
||||
return loc && loc->isValid();
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
// True when there's a usable GPS fix (same source as ownPos).
|
||||
bool gpsHasFix() const { int32_t lat, lon; return ownPos(lat, lon); }
|
||||
|
||||
private:
|
||||
void handleToggle() {
|
||||
|
||||
Reference in New Issue
Block a user