From 2354c52b16dc13c0f44d7dd456c3adf33cb78840 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Mon, 8 Sep 2025 20:53:49 +1000 Subject: [PATCH] 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. --- src/gps/GPS.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index b2904f2de..7a253ff50 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -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;