AP_Baro: support MS5611 on second i2c bus

This commit is contained in:
Lucas De Marchi 2015-09-30 01:26:18 -03:00 committed by Andrew Tridgell
parent e6b942ffb0
commit 386547427d

View File

@ -295,6 +295,11 @@ void AP_Baro::init(void)
drivers[0] = new AP_Baro_MS5611(*this, new AP_SerialBus_I2C(hal.i2c, HAL_BARO_MS5611_I2C_ADDR), false);
_num_drivers = 1;
}
#elif HAL_BARO_DEFAULT == HAL_BARO_MS5611 && HAL_BARO_MS5611_I2C_BUS == 1
{
drivers[0] = new AP_Baro_MS5611(*this, new AP_SerialBus_I2C(hal.i2c1, HAL_BARO_MS5611_I2C_ADDR), false);
_num_drivers = 1;
}
#elif HAL_BARO_DEFAULT == HAL_BARO_MS5611_SPI
{
drivers[0] = new AP_Baro_MS5611(*this,