diff --git a/src/modules/PositionModule.cpp b/src/modules/PositionModule.cpp index 1756e8508e..2fac7dcfcd 100644 --- a/src/modules/PositionModule.cpp +++ b/src/modules/PositionModule.cpp @@ -140,7 +140,7 @@ 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; } @@ -469,4 +469,4 @@ void PositionModule::handleNewPosition() } } -#endif \ No newline at end of file +#endif