mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-10 13:13:27 +00:00
Only log good times. (It's not always a good time then) (#7904)
Further to https://github.com/meshtastic/firmware/pull/7897 , there was another log line that was triggering indiscriminantly on GPS_INTERVAL_THRESHOLD . Rather than logging a bad time 4000 times, let's just log one good time when it is set.
This commit is contained in:
parent
227d0fa7dc
commit
2354c52b16
@ -1546,10 +1546,9 @@ The Unix epoch (or Unix time or POSIX time or Unix timestamp) is the number of s
|
||||
t.tm_year = d.year() - 1900;
|
||||
t.tm_isdst = false;
|
||||
if (t.tm_mon > -1) {
|
||||
LOG_DEBUG("NMEA GPS time %02d-%02d-%02d %02d:%02d:%02d age %d", d.year(), d.month(), t.tm_mday, t.tm_hour, t.tm_min,
|
||||
t.tm_sec, ti.age());
|
||||
if (perhapsSetRTC(RTCQualityGPS, t) == RTCSetResultSuccess) {
|
||||
LOG_DEBUG("Time set.");
|
||||
LOG_DEBUG("NMEA GPS time set %02d-%02d-%02d %02d:%02d:%02d age %d", d.year(), d.month(), t.tm_mday, t.tm_hour,
|
||||
t.tm_min, t.tm_sec, ti.age());
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user