From 6ed43cb3a4d36c15345332652850670215914cd2 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 6 Jun 2015 09:45:07 +0200 Subject: [PATCH] commander: Allow to disarm via switch in HIL --- src/modules/commander/commander.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index c2816fd93f..ca4a30196b 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -1400,7 +1400,7 @@ int commander_thread_main(int argc, char *argv[]) orb_copy(ORB_ID(safety), safety_sub, &safety); /* disarm if safety is now on and still armed */ - if (status.hil_state == vehicle_status_s::HIL_STATE_OFF && safety.safety_switch_available && !safety.safety_off && armed.armed) { + if (safety.safety_switch_available && !safety.safety_off && armed.armed) { arming_state_t new_arming_state = (status.arming_state == vehicle_status_s::ARMING_STATE_ARMED ? vehicle_status_s::ARMING_STATE_STANDBY : vehicle_status_s::ARMING_STATE_STANDBY_ERROR); @@ -1411,7 +1411,7 @@ int commander_thread_main(int argc, char *argv[]) } } - //Notify the user if the status of the safety switch changes + /* notify the user if the status of the safety switch changes */ if (safety.safety_switch_available && previous_safety_off != safety.safety_off) { if (safety.safety_off) {