AP_Compass: use IST8310 for aerofc

This commit is contained in:
Lucas De Marchi 2017-02-10 15:33:23 -08:00 committed by Andrew Tridgell
parent fad583b259
commit 156efd6fec
1 changed files with 7 additions and 1 deletions

View File

@ -10,6 +10,7 @@
#include "AP_Compass_BMM150.h"
#include "AP_Compass_HIL.h"
#include "AP_Compass_HMC5843.h"
#include "AP_Compass_IST8310.h"
#include "AP_Compass_LSM303D.h"
#include "AP_Compass_LSM9DS1.h"
#include "AP_Compass_PX4.h"
@ -517,7 +518,6 @@ void Compass::_detect_backends(void)
ADD_BACKEND(AP_Compass_HMC5843::probe(*this, hal.i2c_mgr->get_device(0, HAL_COMPASS_HMC5843_I2C_ADDR),
both_i2c_external, both_i2c_external?ROTATION_ROLL_180:ROTATION_YAW_270),
AP_Compass_HMC5843::name, both_i2c_external);
#if !HAL_MINIMIZE_FEATURES
#if 0
// lis3mdl - this is disabled for now due to an errata on pixhawk2 GPS unit, pending investigation
@ -540,6 +540,12 @@ void Compass::_detect_backends(void)
}
break;
case AP_BoardConfig::PX4_BOARD_AEROFC:
#ifdef HAL_COMPASS_IST8310_I2C_BUS
ADD_BACKEND(AP_Compass_IST8310::probe(*this, hal.i2c_mgr->get_device(HAL_COMPASS_IST8310_I2C_BUS, HAL_COMPASS_IST8310_I2C_ADDR),
ROTATION_PITCH_180_YAW_90), AP_Compass_IST8310::name, true);
#endif
break;
default:
break;
}