mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-01 10:19:59 +00:00
Minor GPS fixes (#4630)
1. Remove unused line in GPS::probe 2. update new PositionModule::hasQualityTimeSource to handle MESHTASTIC_EXCLUDE_GPS
This commit is contained in:
parent
bb9ddcf2b5
commit
9e55e6befb
@ -1252,9 +1252,6 @@ GnssModel_t GPS::probe(int serialSpeed)
|
||||
LOG_INFO("Aioha AG3335 detected, using AG3335 Module\n");
|
||||
return GNSS_MODEL_AG3335;
|
||||
}
|
||||
// Get version information for Airoha AG3335
|
||||
clearBuffer();
|
||||
_serial_gps->write("$PMTK605*31\r\n");
|
||||
|
||||
// Get version information
|
||||
clearBuffer();
|
||||
@ -1843,4 +1840,4 @@ void GPS::toggleGpsMode()
|
||||
enable();
|
||||
}
|
||||
}
|
||||
#endif // Exclude GPS
|
||||
#endif // Exclude GPS
|
||||
|
@ -146,7 +146,11 @@ bool PositionModule::hasQualityTimesource()
|
||||
{
|
||||
bool setFromPhoneOrNtpToday =
|
||||
lastSetFromPhoneNtpOrGps == 0 ? false : (millis() - lastSetFromPhoneNtpOrGps) <= (SEC_PER_DAY * 1000UL);
|
||||
#if MESHTASTIC_EXCLUDE_GPS
|
||||
bool hasGpsOrRtc = (rtc_found.address != ScanI2C::ADDRESS_NONE.address);
|
||||
#else
|
||||
bool hasGpsOrRtc = (gps && gps->isConnected()) || (rtc_found.address != ScanI2C::ADDRESS_NONE.address);
|
||||
#endif
|
||||
return hasGpsOrRtc || setFromPhoneOrNtpToday;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user