mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user