aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/gyro_calibration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/commander/gyro_calibration.cpp')
-rw-r--r--src/modules/commander/gyro_calibration.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/modules/commander/gyro_calibration.cpp b/src/modules/commander/gyro_calibration.cpp
index e5df4175d..bdef8771e 100644
--- a/src/modules/commander/gyro_calibration.cpp
+++ b/src/modules/commander/gyro_calibration.cpp
@@ -298,10 +298,17 @@ int do_gyro_calibration(int mavlink_fd)
}
}
- mavlink_log_info(mavlink_fd, res == OK ? CAL_QGC_DONE_MSG : CAL_QGC_FAILED_MSG, sensor_name);
+ /* if there is a any preflight-check system response, let the barrage of messages through */
+ usleep(200000);
- // This give a chance for the log messages to go out of the queue before someone else stomps on then
- sleep(1);
+ if (res == OK) {
+ mavlink_log_info(mavlink_fd, CAL_QGC_DONE_MSG, sensor_name);
+ } else {
+ mavlink_log_info(mavlink_fd, CAL_QGC_FAILED_MSG, sensor_name);
+ }
+
+ /* give this message enough time to propagate */
+ usleep(600000);
return res;
}