Airspeed pre-flight check: do not arm if sensor data is stuck or bus errors are high

This commit is contained in:
Lorenz Meier
2016-02-18 09:32:44 +01:00
parent 2aad0c079e
commit 345246953b

View File

@@ -341,6 +341,14 @@ static bool airspeedCheck(int mavlink_fd, bool optional, bool report_fail)
goto out;
}
if (fabsf(airspeed.confidence) < 0.99f) {
if (report_fail) {
mavlink_and_console_log_critical(mavlink_fd, "PREFLIGHT FAIL: AIRSPEED SENSOR COMM ERROR");
}
success = false;
goto out;
}
if (fabsf(airspeed.indicated_airspeed_m_s) > 6.0f) {
if (report_fail) {
mavlink_and_console_log_critical(mavlink_fd, "AIRSPEED WARNING: WIND OR CALIBRATION ISSUE");