commander delete unused rc_signal_lost_cmd

This commit is contained in:
Daniel Agar
2017-12-20 17:55:26 -05:00
committed by Lorenz Meier
parent 5a6cde41d5
commit c0be801b5c
4 changed files with 3 additions and 18 deletions
+2 -11
View File
@@ -960,7 +960,6 @@ Commander::handle_command(vehicle_status_s *status_local, const safety_s *safety
/* param2 is currently used for other failsafe modes */
status_local->engine_failure_cmd = false;
status_flags.data_link_lost_cmd = false;
status_flags.rc_signal_lost_cmd = false;
status_flags.vtol_transition_failure_cmd = false;
if ((int)cmd->param2 <= 0) {
@@ -977,11 +976,6 @@ Commander::handle_command(vehicle_status_s *status_local, const safety_s *safety
status_flags.data_link_lost_cmd = true;
warnx("data link loss mode commanded");
} else if ((int)cmd->param2 == 4) {
/* trigger rc loss mode */
status_flags.rc_signal_lost_cmd = true;
warnx("RC loss mode commanded");
} else if ((int)cmd->param2 == 5) {
/* trigger vtol transition failure mode */
status_flags.vtol_transition_failure_cmd = true;
@@ -2970,8 +2964,8 @@ Commander::run()
internal_state.main_state == commander_state_s::MAIN_STATE_STAB ||
internal_state.main_state == commander_state_s::MAIN_STATE_ALTCTL ||
internal_state.main_state == commander_state_s::MAIN_STATE_POSCTL) &&
((status.rc_signal_lost && status_flags.gps_failure) ||
(status_flags.rc_signal_lost_cmd))) {
((status.rc_signal_lost && status_flags.gps_failure))) {
armed.force_failsafe = true;
status_changed = true;
static bool flight_termination_printed = false;
@@ -4507,9 +4501,6 @@ void publish_status_flags(orb_advert_t &vehicle_status_flags_pub, vehicle_status
if (status_flags.rc_signal_found_once) {
v_flags.other_flags |= vehicle_status_flags_s::RC_SIGNAL_FOUND_ONCE_MASK;
}
if (status_flags.rc_signal_lost_cmd) {
v_flags.other_flags |= vehicle_status_flags_s::RC_SIGNAL_LOST_CMD_MASK;
}
if (status_flags.rc_input_blocked) {
v_flags.other_flags |= vehicle_status_flags_s::RC_INPUT_BLOCKED_MASK;
}