AP_Compass: add LIS3MDL probe for Pixracer

This commit is contained in:
Mark Whitehorn 2017-12-01 17:11:12 -07:00 committed by Andrew Tridgell
parent 512b327cd4
commit b0e2f06a7a
1 changed files with 4 additions and 0 deletions

View File

@ -676,6 +676,10 @@ void Compass::_detect_backends(void)
ADD_BACKEND(DRIVER_HMC5883, AP_Compass_HMC5843::probe(*this, hal.spi->get_device(HAL_COMPASS_HMC5843_NAME), ADD_BACKEND(DRIVER_HMC5883, AP_Compass_HMC5843::probe(*this, hal.spi->get_device(HAL_COMPASS_HMC5843_NAME),
false, ROTATION_PITCH_180), false, ROTATION_PITCH_180),
AP_Compass_HMC5843::name, false); AP_Compass_HMC5843::name, false);
// R15 has LIS3MDL on spi bus instead of HMC; same CS pin
ADD_BACKEND(DRIVER_LIS3MDL, AP_Compass_LIS3MDL::probe(*this, hal.spi->get_device(HAL_COMPASS_LIS3MDL_NAME),
false, ROTATION_NONE),
AP_Compass_LIS3MDL::name, false);
ADD_BACKEND(DRIVER_AK8963, AP_Compass_AK8963::probe_mpu9250(*this, 0, ROTATION_ROLL_180_YAW_90), ADD_BACKEND(DRIVER_AK8963, AP_Compass_AK8963::probe_mpu9250(*this, 0, ROTATION_ROLL_180_YAW_90),
AP_Compass_AK8963::name, false); AP_Compass_AK8963::name, false);
break; break;