Revert "commander: Allow to disarm via switch in HIL"

This reverts commit 6ed43cb3a4.
This commit is contained in:
Lorenz Meier 2015-06-06 10:53:23 +02:00
parent b7986e6fdd
commit ab61ebca2a
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 (safety.safety_switch_available && !safety.safety_off && armed.armed) {
if (status.hil_state == vehicle_status_s::HIL_STATE_OFF && 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) {