Skip to content

Commit

Permalink
Add exception for RTC to not strip time from position (#5262)
Browse files Browse the repository at this point in the history
* Add exception for RTC to not strip time from position

* t
  • Loading branch information
thebentern authored Nov 6, 2024
1 parent 255713d commit 8498b17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8498b17

Please sign in to comment.