From a0af4af5b5c4451ba9406e7bed2b05ddc18b5422 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Dec 2017 16:30:28 +1100 Subject: [PATCH] AP_InertialSensor: debugging code for EK2 bug --- libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp index 6d4807c998..f543f2d242 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_SITL.cpp @@ -136,6 +136,13 @@ void AP_InertialSensor_SITL::generate_gyro(uint8_t instance) void AP_InertialSensor_SITL::timer_update(void) { uint64_t now = AP_HAL::micros64(); +#if 0 + // insert a 1s pause in IMU data. This triggers a pause in EK2 + // processing that leads to some interesting issues + if (now > 5e6 && now < 6e6) { + return; + } +#endif for (uint8_t i=0; i= next_accel_sample[i]) { generate_accel(i);