Shall upgrade RTC currentQuality if higher q available

1.2-legacy
Wei Fang 2020-12-30 21:46:43 -08:00
rodzic 727d8a6456
commit 279c89dca3
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -36,6 +36,7 @@ bool perhapsSetRTC(RTCQuality q, const struct timeval *tv)
bool shouldSet; bool shouldSet;
if (q > currentQuality) { if (q > currentQuality) {
currentQuality = q;
shouldSet = true; shouldSet = true;
DEBUG_MSG("Upgrading time to RTC %ld secs (quality %d)\n", tv->tv_sec, q); DEBUG_MSG("Upgrading time to RTC %ld secs (quality %d)\n", tv->tv_sec, q);
} else if(q == RTCQualityGPS && (now - lastSetMsec) > (12 * 60 * 60 * 1000L)) { } else if(q == RTCQualityGPS && (now - lastSetMsec) > (12 * 60 * 60 * 1000L)) {