mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:03:35 +08:00
Merge branch 'master' of github.com:PX4/Firmware into fmuv2_bringup
This commit is contained in:
@@ -587,6 +587,8 @@ void do_gyro_calibration(int status_pub, struct vehicle_status_s *status)
|
||||
|
||||
close(fd);
|
||||
|
||||
int errcount = 0;
|
||||
|
||||
while (calibration_counter < calibration_count) {
|
||||
|
||||
/* wait blocking for new data */
|
||||
@@ -602,8 +604,12 @@ void do_gyro_calibration(int status_pub, struct vehicle_status_s *status)
|
||||
calibration_counter++;
|
||||
|
||||
} else if (poll_ret == 0) {
|
||||
/* any poll failure for 1s is a reason to abort */
|
||||
mavlink_log_info(mavlink_fd, "gyro calibration aborted, retry");
|
||||
errcount++;
|
||||
}
|
||||
|
||||
if (errcount > 1000) {
|
||||
/* any persisting poll error is a reason to abort */
|
||||
mavlink_log_info(mavlink_fd, "permanent gyro error, aborted.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user