mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 21:43:33 +08:00
commander: fix prearm flag to preflightCheck
This was inverted, i.e. set to false in most cases, whereas it should be true. As a consequence, both powerCheck and airspeed.confidence checks were not executed.
This commit is contained in:
@@ -79,12 +79,12 @@ bool PreFlightCheck::airspeedCheck(orb_advert_t *mavlink_log_pub, vehicle_status
|
||||
goto out;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Check if airspeed is higher than 4m/s (accepted max) while the vehicle is landed / not flying
|
||||
* Negative and positive offsets are considered. Do not check anymore while arming because pitot cover
|
||||
* might have been removed.
|
||||
*/
|
||||
if (fabsf(airspeed.indicated_airspeed_m_s) > 4.0f && !prearm) {
|
||||
if (fabsf(airspeed.indicated_airspeed_m_s) > 4.0f && prearm) {
|
||||
if (report_fail) {
|
||||
mavlink_log_critical(mavlink_log_pub, "Preflight Fail: check Airspeed Cal or Pitot");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user