From b3322ed1ae404b1c48eca88e70ae554b5314a6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Mon, 28 Sep 2015 13:52:01 -0300 Subject: [PATCH] AP_InertialSensor: Add MPU9250 over I2C to detect_backends() --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 38fbad7aec..07160b57f0 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -517,6 +517,10 @@ AP_InertialSensor::_detect_backends(void) //_add_backend(AP_InertialSensor_L3GD20::detect); //_add_backend(AP_InertialSensor_LSM303D::detect); _add_backend(AP_InertialSensor_MPU6000::detect_spi(*this)); +#elif HAL_INS_DEFAULT == HAL_INS_MPU9250_I2C + _add_backend(AP_InertialSensor_MPU9250::detect_i2c(*this, + HAL_INS_MPU9250_I2C_POINTER, + HAL_INS_MPU9250_I2C_ADDR)); #else #error Unrecognised HAL_INS_TYPE setting #endif