From e6b942ffb09fbad522c7bcddcc335431c0c0c4af Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 12 Aug 2015 18:45:30 -0300 Subject: [PATCH] AP_Compass: use HMC5843 behind MPU6000 for minlure --- libraries/AP_Compass/Compass.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Compass/Compass.cpp b/libraries/AP_Compass/Compass.cpp index a4d50dc436..4bfb78bcd1 100644 --- a/libraries/AP_Compass/Compass.cpp +++ b/libraries/AP_Compass/Compass.cpp @@ -428,7 +428,10 @@ void Compass::_detect_backends(void) #if CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT _add_backend(AP_Compass_HMC5843::detect_i2c(*this, hal.i2c)); _add_backend(AP_Compass_LSM303D::detect_spi(*this)); -#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE && CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_BEBOP +#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && \ + CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_NONE && \ + CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_BEBOP && \ + CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_LINUX_MINLURE _add_backend(AP_Compass_HMC5843::detect_i2c(*this, hal.i2c)); _add_backend(AP_Compass_AK8963::detect_mpu9250(*this, hal.spi->device(AP_HAL::SPIDevice_MPU9250))); #elif HAL_COMPASS_DEFAULT == HAL_COMPASS_HIL