AP_Baro: setup for new board PX4 IDs

This commit is contained in:
Andrew Tridgell 2016-11-10 15:29:42 +11:00
parent 4f50d67790
commit 41b132e576
1 changed files with 3 additions and 3 deletions

View File

@ -292,19 +292,19 @@ void AP_Baro::init(void)
}
#if HAL_BARO_DEFAULT == HAL_BARO_PX4 || HAL_BARO_DEFAULT == HAL_BARO_VRBRAIN
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_TEST_V1) {
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PX4V1) {
#ifdef HAL_BARO_MS5611_I2C_BUS
drivers[0] = new AP_Baro_MS5611(*this,
std::move(hal.i2c_mgr->get_device(HAL_BARO_MS5611_I2C_BUS, HAL_BARO_MS5611_I2C_ADDR)));
_num_drivers = 1;
#endif
} else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_TEST_V2 ||
} else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK ||
AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PHMINI ||
AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PH2SLIM) {
drivers[0] = new AP_Baro_MS5611(*this,
std::move(hal.spi->get_device(HAL_BARO_MS5611_NAME)));
_num_drivers = 1;
} else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_TEST_V3) {
} else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK2) {
drivers[0] = new AP_Baro_MS5611(*this,
std::move(hal.spi->get_device(HAL_BARO_MS5611_SPI_EXT_NAME)));
drivers[1] = new AP_Baro_MS5611(*this,