From 025496f65ed73cabebdc4dc57be877bef78af6ea Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Apr 2019 21:12:20 +1000 Subject: [PATCH] AP_Compass: flag compass cal as long expected delay --- libraries/AP_Compass/CompassCalibrator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Compass/CompassCalibrator.cpp b/libraries/AP_Compass/CompassCalibrator.cpp index f33cb3998b..ffbcfd3aa1 100644 --- a/libraries/AP_Compass/CompassCalibrator.cpp +++ b/libraries/AP_Compass/CompassCalibrator.cpp @@ -797,6 +797,9 @@ bool CompassCalibrator::calculate_orientation(void) return true; } + // this function is very slow + hal.scheduler->expect_delay_ms(1000); + float variance[ROTATION_MAX] {}; for (enum Rotation r = ROTATION_NONE; rexpect_delay_ms(0); + if (!pass) { set_status(COMPASS_CAL_BAD_ORIENTATION); return false;