mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_Baro: support new sensor config setup
This commit is contained in:
parent
5eb488303c
commit
f7b9368b94
@ -464,7 +464,10 @@ void AP_Baro::init(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if AP_FEATURE_BOARD_DETECT
|
#if defined(HAL_BARO_PROBE_LIST)
|
||||||
|
// probe list from BARO lines in hwdef.dat
|
||||||
|
HAL_BARO_PROBE_LIST;
|
||||||
|
#elif AP_FEATURE_BOARD_DETECT
|
||||||
switch (AP_BoardConfig::get_board_type()) {
|
switch (AP_BoardConfig::get_board_type()) {
|
||||||
case AP_BoardConfig::PX4_BOARD_PX4V1:
|
case AP_BoardConfig::PX4_BOARD_PX4V1:
|
||||||
#ifdef HAL_BARO_MS5611_I2C_BUS
|
#ifdef HAL_BARO_MS5611_I2C_BUS
|
||||||
@ -490,11 +493,6 @@ void AP_Baro::init(void)
|
|||||||
std::move(hal.spi->get_device(HAL_BARO_MS5611_NAME))));
|
std::move(hal.spi->get_device(HAL_BARO_MS5611_NAME))));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AP_BoardConfig::PX4_BOARD_PIXRACER:
|
|
||||||
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
|
|
||||||
std::move(hal.spi->get_device(HAL_BARO_MS5611_SPI_INT_NAME))));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case AP_BoardConfig::PX4_BOARD_MINDPXV2:
|
case AP_BoardConfig::PX4_BOARD_MINDPXV2:
|
||||||
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
|
ADD_BACKEND(AP_Baro_MS56XX::probe(*this,
|
||||||
std::move(hal.spi->get_device(HAL_BARO_MS5611_NAME))));
|
std::move(hal.spi->get_device(HAL_BARO_MS5611_NAME))));
|
||||||
|
Loading…
Reference in New Issue
Block a user