mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 09:50:35 +08:00
Better airspeed feedback
This commit is contained in:
@@ -200,13 +200,13 @@ int do_airspeed_calibration(int mavlink_fd)
|
||||
float curr_avg = (diff_pres_offset / calibration_counter);
|
||||
|
||||
if (calc_indicated_airspeed(fabsf(curr_avg)) < 10.0f) {
|
||||
mavlink_log_critical(mavlink_fd, "Put a finger on front hole of pitot");
|
||||
mavlink_log_critical(mavlink_fd, "Put a finger on front hole of pitot (%.1f m/s)", curr_avg);
|
||||
usleep(5000 * 1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* do not log negative values in the second go */
|
||||
if (curr_avg < calc_indicated_airspeed(-5.0f)) {
|
||||
if (curr_avg < -calc_indicated_airspeed(5.0f)) {
|
||||
mavlink_log_critical(mavlink_fd, "Negative val: swap static<->dynamic ports,restart");
|
||||
close(diff_pres_sub);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user