From febe41476670e9d756c84a8cc58038f4b895ce35 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Jan 2018 15:59:46 +1100 Subject: [PATCH] AP_InertialSensor: disable fast sampling on 2nd IMU on Pixracer it also hosts a mag, and gets lots of FIFO resets if we try to run it at 8kHz --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 4d640292f7..a358f5970a 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -739,7 +739,8 @@ AP_InertialSensor::detect_backends(void) break; case AP_BoardConfig::PX4_BOARD_PIXRACER: - _fast_sampling_mask.set_default(3); + // only do fast samplng on ICM-20608. The MPU9250 doesn't handle high rate well when it has a mag enabled + _fast_sampling_mask.set_default(1); _add_backend(AP_InertialSensor_Invensense::probe(*this, hal.spi->get_device(HAL_INS_ICM20608_NAME), ROTATION_ROLL_180_YAW_90)); _add_backend(AP_InertialSensor_Invensense::probe(*this, hal.spi->get_device(HAL_INS_MPU9250_NAME), ROTATION_ROLL_180_YAW_90)); break;