Browse Source

AP_InertialSensor: fixed pixfalcon 9250 detection

mission-4.1.18
Andrew Tridgell 8 years ago
parent
commit
18d4286166
  1. 5
      libraries/AP_InertialSensor/AP_InertialSensor.cpp

5
libraries/AP_InertialSensor/AP_InertialSensor.cpp

@ -689,7 +689,10 @@ AP_InertialSensor::detect_backends(void) @@ -689,7 +689,10 @@ AP_InertialSensor::detect_backends(void)
_add_backend(AP_InertialSensor_MPU6000::probe(*this, hal.spi->get_device(HAL_INS_MPU60x0_NAME)));
} else if (AP_BoardConfig::get_board_type() == AP_BoardConfig::PX4_BOARD_PIXHAWK) {
_add_backend(AP_InertialSensor_MPU6000::probe(*this, hal.spi->get_device(HAL_INS_MPU60x0_NAME), ROTATION_ROLL_180));
if (!_add_backend(AP_InertialSensor_MPU6000::probe(*this, hal.spi->get_device(HAL_INS_MPU60x0_NAME), ROTATION_ROLL_180))) {
// handle pixfalcon with mpu9250 instead of mpu6000
_add_backend(AP_InertialSensor_MPU9250::probe(*this, hal.spi->get_device(HAL_INS_MPU9250_NAME), ROTATION_ROLL_180));
}
_add_backend(AP_InertialSensor_LSM9DS0::probe(*this,
hal.spi->get_device(HAL_INS_LSM9DS0_G_NAME),
hal.spi->get_device(HAL_INS_LSM9DS0_A_NAME),

Loading…
Cancel
Save