Skip to content

Commit

Permalink
AP_GPS: allow for EAHRS_SENSORS to not include GPS
Browse files Browse the repository at this point in the history
this allows external AHRS GPS to not be presented to AP_GPS as a
possible driver
  • Loading branch information
tridge committed Aug 17, 2024
1 parent 1fe21b6 commit 3bbfee4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/AP_GPS/AP_GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
dstate->auto_detected_baud = false; // specified, not detected
return NEW_NOTHROW AP_GPS_ExternalAHRS(*this, params[instance], state[instance], nullptr);
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:
Expand Down

0 comments on commit 3bbfee4

Please sign in to comment.