Commander: Adjust airspeed checks on prearm condition

The previous approach would work with old low-end sensors, but with new high-end sensors we get a lot of false alarms on the bench. Relaxing the check to only apply pre-arm will ensure its now only run when the user intents to take off, at which point the airframe should be with pitot covers off in the field.
This commit is contained in:
Lorenz Meier
2017-06-10 14:02:14 +02:00
parent d104f984d4
commit a25330762a

View File

@@ -383,9 +383,15 @@ static bool airspeedCheck(orb_advert_t *mavlink_log_pub, bool optional, bool rep
goto out;
}
if (fabsf(airspeed.confidence) < 0.95f) {
/*
* Check if voter thinks the confidence is low. High-end sensors might have virtually zero noise
* on the bench and trigger false positives of the voter. Therefore only fail this
* for a pre-arm check, as then the cover is off and the natural airflow in the field
* will ensure there is not zero noise.
*/
if (prearm && fabsf(airspeed.confidence) < 0.95f) {
if (report_fail) {
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: AIRSPEED SENSOR COMM ERROR");
mavlink_log_critical(mavlink_log_pub, "PREFLIGHT FAIL: AIRSPEED SENSOR STUCK");
}
success = false;
goto out;