commander: Allow to disarm via switch in HIL

This commit is contained in:
Lorenz Meier 2015-06-06 09:45:07 +02:00
parent 7b36353e52
commit 6ed43cb3a4
1 changed files with 2 additions and 2 deletions

View File

@ -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) {