Fixing issue #639 in a better way, that ensures TIME_SYNC_INTERVAL_RETRY is used over TIME_SYNC_INTERVAL when GPS time was invalid
This commit is contained in:
parent
53570d7ccf
commit
19710bae4b
@ -49,14 +49,10 @@ void calibrateTime(void) {
|
||||
// no RTC -> fallback to GPS time
|
||||
#if (HAS_GPS)
|
||||
t = get_gpstime(&t_msec);
|
||||
if (t) {
|
||||
// only set time source to GPS if GPS time was actually valid
|
||||
timeSource = _gps;
|
||||
}
|
||||
timeSource = _gps;
|
||||
#endif
|
||||
|
||||
if (t)
|
||||
setMyTime((uint32_t)t, t_msec, timeSource); // set time
|
||||
setMyTime((uint32_t)t, t_msec, timeSource); // set time
|
||||
|
||||
} // fallback
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user