mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Commander: fix preflight check condition to fail if not in HIL mode
This commit is contained in:
parent
ffc3373492
commit
a570aa9fac
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user