mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
bug #376 wip - we now kill gps power when it is supposed to be asleep
This commit is contained in:
@@ -95,9 +95,13 @@ uint32_t getValidTime()
|
||||
|
||||
bool GPS::setup()
|
||||
{
|
||||
notifySleepObserver.observe(¬ifySleep);
|
||||
setAwake(true); // Wake GPS power before doing any init
|
||||
bool ok = setupGPS();
|
||||
|
||||
return true;
|
||||
if (ok)
|
||||
notifySleepObserver.observe(¬ifySleep);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -175,7 +179,6 @@ void GPS::loop()
|
||||
|
||||
// If we are overdue for an update, turn on the GPS and at least publish the current status
|
||||
uint32_t now = millis();
|
||||
bool mustPublishUpdate = false;
|
||||
|
||||
if ((now - lastSleepStartMsec) > getSleepTime() && !isAwake) {
|
||||
// We now want to be awake - so wake up the GPS
|
||||
|
||||
Reference in New Issue
Block a user