Skip to content

Commit

Permalink
Merge branch 'master' into 2.5-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-bennett authored Aug 17, 2024
2 parents 33ced7e + 1bbc273 commit c7c620a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/modules/PositionModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ void PositionModule::trySetRtc(meshtastic_Position p, bool isLocal, bool forceUp

bool PositionModule::hasQualityTimesource()
{
bool setFromPhoneOrNtpToday = (millis() - lastSetFromPhoneNtpOrGps) <= (SEC_PER_DAY * 1000UL);
bool setFromPhoneOrNtpToday =
lastSetFromPhoneNtpOrGps == 0 ? false : (millis() - lastSetFromPhoneNtpOrGps) <= (SEC_PER_DAY * 1000UL);
bool hasGpsOrRtc = (gps && gps->isConnected()) || (rtc_found.address != ScanI2C::ADDRESS_NONE.address);
return hasGpsOrRtc || setFromPhoneOrNtpToday;
}
Expand Down

0 comments on commit c7c620a

Please sign in to comment.