mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
minor fix: missing ifdef and autoconfig check
This commit is contained in:
parent
9c3d4603b7
commit
720d994a90
1 changed files with 15 additions and 11 deletions
|
@ -538,7 +538,9 @@ void gpsUpdate(timeUs_t currentTimeUs)
|
|||
// remove GPS from capability
|
||||
sensorsClear(SENSOR_GPS);
|
||||
gpsSetState(GPS_LOST_COMMUNICATION);
|
||||
#ifdef USE_GPS_UBLOX
|
||||
} else {
|
||||
if (gpsConfig()->autoConfig == GPS_AUTOCONFIG_ON) { // Only if autoconfig is enabled
|
||||
if ((gpsData.messageState == GPS_MESSAGE_STATE_INITIALIZED) && STATE(GPS_FIX) && (gpsConfig()->gps_ublox_mode == UBLOX_DYNAMIC)) {
|
||||
gpsData.messageState = GPS_MESSAGE_STATE_PEDESTRIAN_TO_AIRBORNE;
|
||||
gpsData.state_position = 0;
|
||||
|
@ -554,6 +556,8 @@ void gpsUpdate(timeUs_t currentTimeUs)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif //USE_GPS_UBLOX
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (sensors(SENSOR_GPS)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue