From 8498b175e74fdb883eaef20e0e8f56c6726cef71 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 5 Nov 2024 20:06:43 -0600 Subject: [PATCH] Add exception for RTC to not strip time from position (#5262) * Add exception for RTC to not strip time from position * t --- src/modules/PositionModule.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 1baa550c09..b9847c22b0 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -251,6 +251,9 @@ meshtastic_MeshPacket *PositionModule::allocReply() if (getRTCQuality() < RTCQualityNTP) { LOG_INFO("Strip time %u from position send", p.time); p.time = 0; + } else if (rtc_found.address != ScanI2C::ADDRESS_NONE.address) { + LOG_INFO("Using RTC time %u for position send", p.time); + p.time = getValidTime(RTCQualityDevice); } else { p.time = getValidTime(RTCQualityNTP); LOG_INFO("Provide time to mesh %u", p.time);