1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

[GPS] fix GPS discovery for M6 and earlier

This commit is contained in:
Jonathan Hudson 2023-11-05 09:40:11 +00:00
parent 24c24c4fdf
commit 52579eb84b

View file

@ -1042,12 +1042,14 @@ STATIC_PROTOTHREAD(gpsProtocolStateThread)
gpsState.autoConfigStep = 0; gpsState.autoConfigStep = 0;
ubx_capabilities.supported = ubx_capabilities.enabledGnss = ubx_capabilities.defaultGnss = 0; ubx_capabilities.supported = ubx_capabilities.enabledGnss = ubx_capabilities.defaultGnss = 0;
do { // M6 and earlier will never get pass this step, so skip it (#9440)
pollGnssCapabilities(); if (gpsState.hwVersion > UBX_HW_VERSION_UBLOX6) {
gpsState.autoConfigStep++; do {
ptWaitTimeout((ubx_capabilities.capMaxGnss != 0), GPS_CFG_CMD_TIMEOUT_MS); pollGnssCapabilities();
} while (gpsState.autoConfigStep < GPS_VERSION_RETRY_TIMES && ubx_capabilities.capMaxGnss == 0); gpsState.autoConfigStep++;
ptWaitTimeout((ubx_capabilities.capMaxGnss != 0), GPS_CFG_CMD_TIMEOUT_MS);
} while (gpsState.autoConfigStep < GPS_VERSION_RETRY_TIMES && ubx_capabilities.capMaxGnss == 0);
}
// Configure GPS module if enabled // Configure GPS module if enabled
if (gpsState.gpsConfig->autoConfig) { if (gpsState.gpsConfig->autoConfig) {
// Configure GPS // Configure GPS