Browse Source

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

mission-4.1.18
Tom Pittenger 8 years ago committed by Andrew Tridgell
parent
commit
fb24a03faf
  1. 2
      libraries/AP_Baro/AP_Baro.cpp

2
libraries/AP_Baro/AP_Baro.cpp

@ -406,9 +406,11 @@ void AP_Baro::init(void) @@ -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:

Loading…
Cancel
Save