1
0
Fork 0
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:
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
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)) {