From 18f0fc50d590c338974818e3094d229be40e997c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 24 Jan 2023 15:40:17 +1100 Subject: [PATCH] AP_InertialSensor: allow enabling of only some ExternalAHRS sensors --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 608cbfbcda..0f8b29948a 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -1072,7 +1072,7 @@ AP_InertialSensor::detect_backends(void) #if HAL_EXTERNAL_AHRS_ENABLED // if enabled, make the first IMU the external AHRS - const int8_t serial_port = AP::externalAHRS().get_port(); + const int8_t serial_port = AP::externalAHRS().get_port(AP_ExternalAHRS::AvailableSensor::IMU); if (serial_port >= 0) { ADD_BACKEND(new AP_InertialSensor_ExternalAHRS(*this, serial_port)); }