Merge pull request #612 from wfang2002/master

Fix GPS turned on then off immediately every 2 minutes
This commit is contained in:
Kevin Hester 2021-01-02 14:13:48 +08:00 committed by GitHub
commit bd03650140
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -239,6 +239,7 @@ int32_t GPS::runOnce()
}
// We've been awake too long - force sleep
now = millis();
auto wakeTime = getWakeTime();
bool tooLong = wakeTime != UINT32_MAX && (now - lastWakeStartMsec) > wakeTime;