mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-28 02:32:09 +00:00
Merge pull request #613 from wfang2002/#604_rtc
Shall upgrade RTC currentQuality if higher q available (fix #604)
This commit is contained in:
commit
96328526b7
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user