Commander: fix preflight check condition to fail if not in HIL mode

This commit is contained in:
Nicolas de Palezieux 2020-02-19 19:24:17 +01:00 committed by Beat Küng
parent ffc3373492
commit a570aa9fac

View File

@ -697,7 +697,7 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_
} else {
// Refuse to arm if preflight checks have failed
if ((!status_local->hil_state) != vehicle_status_s::HIL_STATE_ON
if (status_local->hil_state != vehicle_status_s::HIL_STATE_ON
&& !status_flags.condition_system_sensors_initialized) {
mavlink_log_critical(&mavlink_log_pub, "Arming denied! Preflight checks have failed");
cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_DENIED;