AP_Compass: allow for HAL_COMPASS_NONE

This commit is contained in:
Andrew Tridgell 2018-03-02 11:45:02 +11:00
parent 43f1b43b6c
commit 8b3db7c09f

View File

@ -873,6 +873,8 @@ void Compass::_detect_backends(void)
#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);
#elif HAL_COMPASS_DEFAULT == HAL_COMPASS_NONE
// no compass
#else
#error Unrecognised HAL_COMPASS_TYPE setting
#endif