AP_Baro: allow enabling of only some ExternalAHRS sensors

This commit is contained in:
Andrew Tridgell 2023-01-24 15:40:17 +11:00
parent 32ee3002eb
commit cf2b04d082
1 changed files with 1 additions and 1 deletions

View File

@ -618,7 +618,7 @@ void AP_Baro::init(void)
#endif #endif
#if AP_BARO_EXTERNALAHRS_ENABLED #if AP_BARO_EXTERNALAHRS_ENABLED
const int8_t serial_port = AP::externalAHRS().get_port(); const int8_t serial_port = AP::externalAHRS().get_port(AP_ExternalAHRS::AvailableSensor::BARO);
if (serial_port >= 0) { if (serial_port >= 0) {
ADD_BACKEND(new AP_Baro_ExternalAHRS(*this, serial_port)); ADD_BACKEND(new AP_Baro_ExternalAHRS(*this, serial_port));
} }