AP_Compass: support ChibiOS FMUv4

This commit is contained in:
Andrew Tridgell 2018-01-10 21:34:13 +11:00
parent c7fd455f6a
commit 743714de4c
1 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@ void Compass::_detect_backends(void)
return;
}
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if AP_FEATURE_BOARD_DETECT
if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK2) {
// default to disabling LIS3MDL on pixhawk2 due to hardware issue
_driver_type_mask.set_default(1U<<DRIVER_LIS3MDL);
@ -560,7 +560,7 @@ void Compass::_detect_backends(void)
#if HAL_COMPASS_DEFAULT == HAL_COMPASS_HIL
ADD_BACKEND(DRIVER_SITL, AP_Compass_HIL::detect(*this), nullptr, false);
#elif HAL_COMPASS_DEFAULT == HAL_COMPASS_PX4 || HAL_COMPASS_DEFAULT == HAL_COMPASS_VRBRAIN || defined(HAL_CHIBIOS_ARCH_FMUV3)
#elif AP_FEATURE_BOARD_DETECT
switch (AP_BoardConfig::get_board_type()) {
case AP_BoardConfig::PX4_BOARD_PX4V1:
case AP_BoardConfig::PX4_BOARD_PIXHAWK: