From 2fc6e5243127cef3adb47f3879a89f9ac4604136 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 20 Sep 2017 15:08:44 -0700 Subject: [PATCH] AP_Compass: use IST8310 and HMC5883 as external mags --- libraries/AP_Compass/AP_Compass.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_Compass/AP_Compass.cpp b/libraries/AP_Compass/AP_Compass.cpp index 2b0a3cea06..b690aa7a0c 100644 --- a/libraries/AP_Compass/AP_Compass.cpp +++ b/libraries/AP_Compass/AP_Compass.cpp @@ -763,6 +763,10 @@ void Compass::_detect_backends(void) #elif HAL_COMPASS_DEFAULT == HAL_COMPASS_AERO 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, false); + ADD_BACKEND(DRIVER_HMC5883, AP_Compass_HMC5843::probe(*this, hal.i2c_mgr->get_device(HAL_COMPASS_HMC5843_I2C_BUS, HAL_COMPASS_HMC5843_I2C_ADDR), true), + AP_Compass_HMC5843::name, true); + ADD_BACKEND(DRIVER_IST8310, AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(HAL_COMPASS_IST8310_I2C_BUS, HAL_COMPASS_IST8310_I2C_ADDR), + true, ROTATION_PITCH_180_YAW_90), AP_Compass_IST8310::name, true); #elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE ADD_BACKEND(DRIVER_HMC5883, AP_Compass_HMC5843::probe(*this, hal.i2c_mgr->get_device(HAL_COMPASS_HMC5843_I2C_BUS, HAL_COMPASS_HMC5843_I2C_ADDR)), AP_Compass_HMC5843::name, false);