AP_Compass: added ChibiOS external compass config

This commit is contained in:
kozinalexey 2018-04-14 09:31:11 +10:00 committed by Andrew Tridgell
parent db6c6b1677
commit 444c0bb54c
1 changed files with 7 additions and 0 deletions

View File

@ -932,6 +932,13 @@ void Compass::_detect_backends(void)
AP_Compass_QMC5883L::name, true);
#endif
/* for chibios external board coniguration */
#ifdef HAL_EXT_COMPASS_HMC5843_I2C_BUS
ADD_BACKEND(DRIVER_HMC5883, AP_Compass_HMC5843::probe(*this, hal.i2c_mgr->get_device(HAL_EXT_COMPASS_HMC5843_I2C_BUS, HAL_COMPASS_HMC5843_I2C_ADDR),
true, ROTATION_ROLL_180),
AP_Compass_HMC5843::name, true);
#endif
#if HAL_WITH_UAVCAN
if (_driver_enabled(DRIVER_UAVCAN)) {
bool added;