From 6569437ae268978684c78192020e14fc3f7292d6 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 5 Nov 2024 19:32:50 -0600 Subject: [PATCH 1/2] Add exception for RTC to not strip time from position --- src/modules/PositionModule.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 1baa550c09..baeb7a7d7a 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -251,7 +251,11 @@ meshtastic_MeshPacket *PositionModule::allocReply() if (getRTCQuality() < RTCQualityNTP) { LOG_INFO("Strip time %u from position send", p.time); p.time = 0; - } else { + } 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); } From 51d246a8e5891ef391f74960c37c97376e064e99 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Tue, 5 Nov 2024 19:47:27 -0600 Subject: [PATCH 2/2] t --- src/modules/PositionModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index baeb7a7d7a..b9847c22b0 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -254,8 +254,7 @@ meshtastic_MeshPacket *PositionModule::allocReply() } 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 { + } else { p.time = getValidTime(RTCQualityNTP); LOG_INFO("Provide time to mesh %u", p.time); }