mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_GPS: disable esoteric GPS types on FMUv2
This commit is contained in:
parent
977cd3c486
commit
c0cc2faefd
@ -389,6 +389,9 @@ AP_GPS::detect_instance(uint8_t instance)
|
|||||||
_broadcast_gps_type("u-blox", instance, dstate->current_baud);
|
_broadcast_gps_type("u-blox", instance, dstate->current_baud);
|
||||||
new_gps = new AP_GPS_UBLOX(*this, state[instance], _port[instance]);
|
new_gps = new AP_GPS_UBLOX(*this, state[instance], _port[instance]);
|
||||||
}
|
}
|
||||||
|
#if !HAL_MINIMIZE_FEATURES
|
||||||
|
// we drop the MTK drivers when building a small build as they are so rarely used
|
||||||
|
// and are surprisingly large
|
||||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_MTK19) &&
|
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_MTK19) &&
|
||||||
AP_GPS_MTK19::_detect(dstate->mtk19_detect_state, data)) {
|
AP_GPS_MTK19::_detect(dstate->mtk19_detect_state, data)) {
|
||||||
_broadcast_gps_type("MTK19", instance, dstate->current_baud);
|
_broadcast_gps_type("MTK19", instance, dstate->current_baud);
|
||||||
@ -399,17 +402,19 @@ AP_GPS::detect_instance(uint8_t instance)
|
|||||||
_broadcast_gps_type("MTK", instance, dstate->current_baud);
|
_broadcast_gps_type("MTK", instance, dstate->current_baud);
|
||||||
new_gps = new AP_GPS_MTK(*this, state[instance], _port[instance]);
|
new_gps = new AP_GPS_MTK(*this, state[instance], _port[instance]);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_SBP) &&
|
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_SBP) &&
|
||||||
AP_GPS_SBP::_detect(dstate->sbp_detect_state, data)) {
|
AP_GPS_SBP::_detect(dstate->sbp_detect_state, data)) {
|
||||||
_broadcast_gps_type("SBP", instance, dstate->current_baud);
|
_broadcast_gps_type("SBP", instance, dstate->current_baud);
|
||||||
new_gps = new AP_GPS_SBP(*this, state[instance], _port[instance]);
|
new_gps = new AP_GPS_SBP(*this, state[instance], _port[instance]);
|
||||||
}
|
}
|
||||||
// save a bit of code space on a 1280
|
#if !HAL_MINIMIZE_FEATURES
|
||||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_SIRF) &&
|
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_SIRF) &&
|
||||||
AP_GPS_SIRF::_detect(dstate->sirf_detect_state, data)) {
|
AP_GPS_SIRF::_detect(dstate->sirf_detect_state, data)) {
|
||||||
_broadcast_gps_type("SIRF", instance, dstate->current_baud);
|
_broadcast_gps_type("SIRF", instance, dstate->current_baud);
|
||||||
new_gps = new AP_GPS_SIRF(*this, state[instance], _port[instance]);
|
new_gps = new AP_GPS_SIRF(*this, state[instance], _port[instance]);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_ERB) &&
|
else if ((_type[instance] == GPS_TYPE_AUTO || _type[instance] == GPS_TYPE_ERB) &&
|
||||||
AP_GPS_ERB::_detect(dstate->erb_detect_state, data)) {
|
AP_GPS_ERB::_detect(dstate->erb_detect_state, data)) {
|
||||||
_broadcast_gps_type("ERB", instance, dstate->current_baud);
|
_broadcast_gps_type("ERB", instance, dstate->current_baud);
|
||||||
|
Loading…
Reference in New Issue
Block a user