From c17a5e5ed18927824590880f2108080fbd6fe472 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Oct 2013 11:48:37 +1100 Subject: [PATCH] AP_InertialSensor: added a small delay in accel calibration allows threads to run on Linux --- 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 c5e8848fc6..d9720ea52d 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -371,6 +371,8 @@ bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract* interact samples[i] += get_accel(); hal.scheduler->delay(10); num_samples++; + } else { + hal.scheduler->delay_microseconds(500); } } samples[i] /= num_samples;