From 14172d69d5ae6e519e238f6f2bdc5fa3074d6e40 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Jan 2019 11:48:23 +1100 Subject: [PATCH] AP_Baro: removed F4Light --- libraries/AP_Baro/AP_Baro.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/libraries/AP_Baro/AP_Baro.cpp b/libraries/AP_Baro/AP_Baro.cpp index 46fc8369a8..933989122d 100644 --- a/libraries/AP_Baro/AP_Baro.cpp +++ b/libraries/AP_Baro/AP_Baro.cpp @@ -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");