Add exception for RTC to not strip time from position (#5262)

* Add exception for RTC to not strip time from position

* t
This commit is contained in:
Ben Meadors
2024-11-05 20:06:43 -06:00
committed by GitHub
parent 255713d23d
commit 8498b175e7

View File

@@ -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);