From ad18e99bef6665a7d74d7d0ae982277ef3e16cf0 Mon Sep 17 00:00:00 2001 From: davidaroyer Date: Thu, 17 Aug 2017 17:42:17 -0500 Subject: [PATCH] AP_Compass: add support for Aerotenna OcPoC-Zynq hardware --- libraries/AP_Compass/AP_Compass.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Compass/AP_Compass.cpp b/libraries/AP_Compass/AP_Compass.cpp index f1deacdef1..cafc09c498 100644 --- a/libraries/AP_Compass/AP_Compass.cpp +++ b/libraries/AP_Compass/AP_Compass.cpp @@ -729,6 +729,11 @@ void Compass::_detect_backends(void) AP_Compass_AK8963::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); +#elif HAL_COMPASS_DEFAULT == HAL_COMPASS_OCPOC_ZYNQ + 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, true); + ADD_BACKEND(DRIVER_AK8963,AP_Compass_AK8963::probe_mpu9250(*this, 0), + AP_Compass_AK8963::name, false); #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXF || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_ERLEBRAIN2 || \ CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_PXFMINI