From f84f432ecf558a3b5717ecccdbb961368ac4211b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 22 Nov 2014 13:25:23 +1100 Subject: [PATCH] AP_InertialSensor: allow gyro calibration to take up to 30 seconds this gives time for the user time to get their battery hatches on and hold the model steady. 5 seconds was just far too short --- libraries/AP_InertialSensor/AP_InertialSensor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor.cpp b/libraries/AP_InertialSensor/AP_InertialSensor.cpp index 1d81340480..45d0226dc1 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor.cpp @@ -687,9 +687,9 @@ AP_InertialSensor::_init_gyro() uint8_t num_converged = 0; - // we try to get a good calibration estimate for up to 10 seconds + // we try to get a good calibration estimate for up to 30 seconds // if the gyros are stable, we should get it in 1 second - for (int16_t j = 0; j <= 20 && num_converged < num_gyros; j++) { + for (int16_t j = 0; j <= 30*4 && num_converged < num_gyros; j++) { Vector3f gyro_sum[INS_MAX_INSTANCES], gyro_avg[INS_MAX_INSTANCES], gyro_diff[INS_MAX_INSTANCES]; float diff_norm[INS_MAX_INSTANCES]; uint8_t i;