mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 18:26:11 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// True when the global SensorManager has a usable GPS fix.
|
// True when there's a usable GPS fix (same source as ownPos).
|
||||||
static bool gpsHasFix() {
|
bool gpsHasFix() const { int32_t lat, lon; return ownPos(lat, lon); }
|
||||||
#if ENV_INCLUDE_GPS == 1
|
|
||||||
LocationProvider* loc = sensors.getLocationProvider();
|
|
||||||
return loc && loc->isValid();
|
|
||||||
#else
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleToggle() {
|
void handleToggle() {
|
||||||
|
|||||||
Reference in New Issue
Block a user