AP_Baro: Add MS5637 over I2C to init()
This commit is contained in:
parent
6215a3d224
commit
9a98eb35fc
@ -308,6 +308,13 @@ void AP_Baro::init(void)
|
||||
drivers[0] = new AP_Baro_MS5607(*this, new AP_SerialBus_I2C(hal.i2c1, HAL_BARO_MS5607_I2C_ADDR), true);
|
||||
_num_drivers = 1;
|
||||
}
|
||||
#elif HAL_BARO_DEFAULT == HAL_BARO_MS5637_I2C
|
||||
{
|
||||
AP_SerialBus *bus = new AP_SerialBus_I2C(HAL_BARO_MS5611_I2C_POINTER,
|
||||
HAL_BARO_MS5611_I2C_ADDR);
|
||||
drivers[0] = new AP_Baro_MS5637(*this, bus, true);
|
||||
_num_drivers = 1;
|
||||
}
|
||||
#endif
|
||||
if (_num_drivers == 0 || _num_sensors == 0 || drivers[0] == NULL) {
|
||||
hal.scheduler->panic(PSTR("Baro: unable to initialise driver"));
|
||||
|
Loading…
Reference in New Issue
Block a user