From cb70bae1679543cb0be487cf1e82fe98e92c4cbe Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 9 Nov 2016 21:19:39 +1100 Subject: [PATCH] AP_InertialSensor: use in-tree drivers for PH2SLIM --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index e57bf05bd5..32f4aa7a25 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -698,6 +698,8 @@ AP_InertialSensor::detect_backends(void) // PHMINI uses ICM20608 on the ACCEL_MAG device and a MPU9250 on the old MPU6000 CS line _add_backend(AP_InertialSensor_MPU6000::probe(*this, hal.spi->get_device(HAL_INS_ICM20608_AM_NAME), ROTATION_ROLL_180)); _add_backend(AP_InertialSensor_MPU9250::probe(*this, hal.spi->get_device(HAL_INS_MPU9250_NAME), false, ROTATION_ROLL_180)); + } else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PH2SLIM) { + _add_backend(AP_InertialSensor_MPU9250::probe(*this, hal.spi->get_device(HAL_INS_MPU9250_NAME), true, ROTATION_YAW_270)); } // also add any PX4 backends (eg. canbus sensors) _add_backend(AP_InertialSensor_PX4::detect(*this));