AP_Compass: use generic defines for BMM150

This commit is contained in:
Andrew Tridgell 2018-01-19 16:06:45 +11:00
parent 00d3c158db
commit 2c8e6bb834

View File

@ -858,8 +858,8 @@ void Compass::_detect_backends(void)
AP_Compass_AK8963::name, false);
ADD_BACKEND(DRIVER_LSM9DS1, AP_Compass_LSM9DS1::probe(*this, hal.spi->get_device("lsm9ds1_m")),
AP_Compass_LSM9DS1::name, false);
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_CHIBIOS_SKYVIPER_F412
ADD_BACKEND(DRIVER_BMM150, AP_Compass_BMM150::probe(*this, hal.i2c_mgr->get_device(0, 0x10)),
#elif HAL_COMPASS_DEFAULT == HAL_COMPASS_BMM150_I2C
ADD_BACKEND(DRIVER_BMM150, AP_Compass_BMM150::probe(*this, hal.i2c_mgr->get_device(HAL_COMPASS_BMM150_I2C_BUS, HAL_COMPASS_BMM150_I2C_ADDR)),
AP_Compass_BMM150::name, true);
#else
#error Unrecognised HAL_COMPASS_TYPE setting