AP_GPS: allow for EAHRS_SENSORS to not include GPS

this allows external AHRS GPS to not be presented to AP_GPS as a
possible driver
This commit is contained in:
Andrew Tridgell 2024-08-18 09:05:45 +10:00
parent 7c5a46bac2
commit 669cb6563b

View File

@ -652,8 +652,11 @@ AP_GPS_Backend *AP_GPS::_detect_instance(uint8_t instance)
#endif
#if HAL_EXTERNAL_AHRS_ENABLED
case GPS_TYPE_EXTERNAL_AHRS:
if (AP::externalAHRS().get_port(AP_ExternalAHRS::AvailableSensor::GPS) >= 0) {
dstate->auto_detected_baud = false; // specified, not detected
return NEW_NOTHROW AP_GPS_ExternalAHRS(*this, params[instance], state[instance], nullptr);
}
break;
#endif
#if AP_GPS_GSOF_ENABLED
case GPS_TYPE_GSOF: