mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-23 03:00:56 +00:00
Refactored status handlers and merged
This commit is contained in:
@@ -128,14 +128,9 @@ The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of s
|
||||
} else // we didn't get a location update, go back to sleep and hope the characters show up
|
||||
wantNewLocation = true;
|
||||
|
||||
meshtastic::GPSStatus status;
|
||||
status.hasLock = hasLock();
|
||||
status.isConnected = isConnected;
|
||||
status.latitude = latitude;
|
||||
status.longitude = longitude;
|
||||
status.altitude = altitude;
|
||||
status.dop = dop;
|
||||
newStatus.notifyObservers(status);
|
||||
// Notify any status instances that are observing us
|
||||
const meshtastic::GPSStatus status = meshtastic::GPSStatus(hasLock(), isConnected, latitude, longitude, altitude, dop);
|
||||
newStatus.notifyObservers(&status);
|
||||
|
||||
// Once we have sent a location once we only poll the GPS rarely, otherwise check back every 1s until we have something over
|
||||
// the serial
|
||||
|
||||
Reference in New Issue
Block a user