Implemented config command, fixed a number range set / get issues for some sensor drivers, fixed gyro calibration

This commit is contained in:
Lorenz Meier
2013-07-26 18:24:37 +02:00
parent a8ac56b9e5
commit 95dde5f1be
5 changed files with 496 additions and 16 deletions
+8 -2
View File
@@ -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;
}
}