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:
Beat Küng
2020-01-25 11:17:33 +01:00
committed by Lorenz Meier
parent 4fef3dd7d5
commit 9e7dcd4b06
3 changed files with 7 additions and 6 deletions
@@ -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");
}