1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 09:45:37 +03:00

minor fix: missing ifdef and autoconfig check

This commit is contained in:
Tony Cabello 2020-03-21 16:25:25 +01:00
parent 9c3d4603b7
commit 720d994a90

View file

@ -538,7 +538,9 @@ void gpsUpdate(timeUs_t currentTimeUs)
// remove GPS from capability // remove GPS from capability
sensorsClear(SENSOR_GPS); sensorsClear(SENSOR_GPS);
gpsSetState(GPS_LOST_COMMUNICATION); gpsSetState(GPS_LOST_COMMUNICATION);
#ifdef USE_GPS_UBLOX
} else { } 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)) { 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.messageState = GPS_MESSAGE_STATE_PEDESTRIAN_TO_AIRBORNE;
gpsData.state_position = 0; gpsData.state_position = 0;
@ -554,6 +556,8 @@ void gpsUpdate(timeUs_t currentTimeUs)
} }
} }
} }
#endif //USE_GPS_UBLOX
}
break; break;
} }
if (sensors(SENSOR_GPS)) { if (sensors(SENSOR_GPS)) {