AP_Baro: don't compile drivers for devices that don't use them

This commit is contained in:
Tom Pittenger 2017-02-12 18:51:46 -08:00 committed by Andrew Tridgell
parent 156efd6fec
commit fb24a03faf
1 changed files with 2 additions and 0 deletions

View File

@ -406,9 +406,11 @@ void AP_Baro::init(void)
break;
case AP_BoardConfig::PX4_BOARD_AEROFC:
#ifdef HAL_BARO_MS5607_I2C_BUS
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
std::move(hal.i2c_mgr->get_device(HAL_BARO_MS5607_I2C_BUS, HAL_BARO_MS5607_I2C_ADDR)),
AP_Baro_MS56XX::BARO_MS5607));
#endif
break;
default: