mirror of https://github.com/ArduPilot/ardupilot
AP_GPS: fix MAV compile error
This commit is contained in:
parent
1997a4e044
commit
aeb1de08f5
|
@ -284,6 +284,14 @@ AP_GPS::detect_instance(uint8_t instance)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// user has to explicitly set the MAV type, do not use AUTO
|
||||||
|
// do not try to detect the MAV type, assume it's there
|
||||||
|
if (_type[instance] == GPS_TYPE_MAV) {
|
||||||
|
_broadcast_gps_type("MAV", instance, -1);
|
||||||
|
new_gps = new AP_GPS_MAV(*this, state[instance], NULL);
|
||||||
|
goto found_gps;
|
||||||
|
}
|
||||||
|
|
||||||
if (_port[instance] == NULL) {
|
if (_port[instance] == NULL) {
|
||||||
// UART not available
|
// UART not available
|
||||||
return;
|
return;
|
||||||
|
@ -305,14 +313,6 @@ AP_GPS::detect_instance(uint8_t instance)
|
||||||
new_gps = new AP_GPS_NOVA(*this, state[instance], _port[instance]);
|
new_gps = new AP_GPS_NOVA(*this, state[instance], _port[instance]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// user has to explicitly set the MAV type, do not use AUTO
|
|
||||||
// Do not try to detect the MAV type, assume it's there
|
|
||||||
if (_type[instance] == GPS_TYPE_MAV) {
|
|
||||||
_broadcast_gps_type("MAV", instance, -1);
|
|
||||||
new_gps = new AP_GPS_MAV(*this, state[instance], NULL);
|
|
||||||
goto found_gps;
|
|
||||||
}
|
|
||||||
|
|
||||||
// record the time when we started detection. This is used to try
|
// record the time when we started detection. This is used to try
|
||||||
// to avoid initialising a uBlox as a NMEA GPS
|
// to avoid initialising a uBlox as a NMEA GPS
|
||||||
if (dstate->detect_started_ms == 0) {
|
if (dstate->detect_started_ms == 0) {
|
||||||
|
@ -394,9 +394,7 @@ AP_GPS::detect_instance(uint8_t instance)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 || CONFIG_HAL_BOARD == HAL_BOARD_QURT
|
|
||||||
found_gps:
|
found_gps:
|
||||||
#endif
|
|
||||||
if (new_gps != NULL) {
|
if (new_gps != NULL) {
|
||||||
state[instance].status = NO_FIX;
|
state[instance].status = NO_FIX;
|
||||||
drivers[instance] = new_gps;
|
drivers[instance] = new_gps;
|
||||||
|
|
Loading…
Reference in New Issue