AP_Baro: removed F4Light

This commit is contained in:
Andrew Tridgell 2019-01-21 11:48:23 +11:00
parent 146f52036f
commit 14172d69d5
1 changed files with 1 additions and 28 deletions

View File

@ -589,21 +589,6 @@ void AP_Baro::init(void)
std::move(hal.spi->get_device(HAL_BARO_LPS22H_NAME))));
#endif
#if defined(BOARD_I2C_BUS_EXT) && CONFIG_HAL_BOARD == HAL_BOARD_F4LIGHT
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
std::move(hal.i2c_mgr->get_device(BOARD_I2C_BUS_EXT, HAL_BARO_MS5611_I2C_ADDR))));
ADD_BACKEND(AP_Baro_BMP280::probe(*this,
std::move(hal.i2c_mgr->get_device(BOARD_I2C_BUS_EXT, HAL_BARO_BMP280_I2C_ADDR))));
#ifdef HAL_BARO_BMP280_I2C_ADDR_ALT
ADD_BACKEND(AP_Baro_BMP280::probe(*this,
std::move(hal.i2c_mgr->get_device(BOARD_I2C_BUS_EXT, HAL_BARO_BMP280_I2C_ADDR_ALT))));
#endif
ADD_BACKEND(AP_Baro_BMP085::probe(*this,
std::move(hal.i2c_mgr->get_device(BOARD_I2C_BUS_EXT, HAL_BARO_BMP085_I2C_ADDR))));
#endif
// can optionally have baro on I2C too
if (_ext_bus >= 0) {
#if APM_BUILD_TYPE(APM_BUILD_ArduSub)
@ -615,18 +600,6 @@ void AP_Baro::init(void)
#else
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
std::move(hal.i2c_mgr->get_device(_ext_bus, HAL_BARO_MS5611_I2C_ADDR))));
#if CONFIG_HAL_BOARD == HAL_BOARD_F4LIGHT // we don't know which baro user will solder
ADD_BACKEND(AP_Baro_BMP280::probe(*this,
std::move(hal.i2c_mgr->get_device(_ext_bus, HAL_BARO_BMP280_I2C_ADDR))));
#ifdef HAL_BARO_BMP280_I2C_ADDR_ALT
ADD_BACKEND(AP_Baro_BMP280::probe(*this,
std::move(hal.i2c_mgr->get_device(_ext_bus, HAL_BARO_BMP280_I2C_ADDR_ALT))));
#endif
ADD_BACKEND(AP_Baro_BMP085::probe(*this,
std::move(hal.i2c_mgr->get_device(_ext_bus, HAL_BARO_BMP085_I2C_ADDR))));
#endif
#endif
}
@ -634,7 +607,7 @@ void AP_Baro::init(void)
_probe_i2c_barometers();
#endif
#if CONFIG_HAL_BOARD != HAL_BOARD_F4LIGHT && !defined(HAL_BARO_ALLOW_INIT_NO_BARO) // most boards requires external baro
#if !defined(HAL_BARO_ALLOW_INIT_NO_BARO) // most boards requires external baro
if (_num_drivers == 0 || _num_sensors == 0 || drivers[0] == nullptr) {
AP_BoardConfig::sensor_config_error("Baro: unable to initialise driver");