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:
parent
24c24c4fdf
commit
52579eb84b
1 changed files with 8 additions and 6 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue