Log antispam (#8241)

* less power spam

* Don't warn about the first 4 GPS checksum failures
This commit is contained in:
Jonathan Bennett
2025-10-07 00:37:04 -05:00
committed by GitHub
parent fc1737c949
commit b696e083f3
3 changed files with 12 additions and 4 deletions

View File

@@ -1589,8 +1589,12 @@ bool GPS::lookForLocation()
#ifndef TINYGPS_OPTION_NO_STATISTICS
if (reader.failedChecksum() > lastChecksumFailCount) {
LOG_WARN("%u new GPS checksum failures, for a total of %u", reader.failedChecksum() - lastChecksumFailCount,
reader.failedChecksum());
// In a GPS_DEBUG build we want to log all of these. In production, we only care if there are many of them.
#ifndef GPS_DEBUG
if (reader.failedChecksum() > 4)
#endif
LOG_WARN("%u new GPS checksum failures, for a total of %u", reader.failedChecksum() - lastChecksumFailCount,
reader.failedChecksum());
lastChecksumFailCount = reader.failedChecksum();
}
#endif