From f435bea57cad4be218843bb7e15d2a6bf2c22f68 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Wed, 16 Dec 2020 14:57:46 +0100 Subject: [PATCH] state_machine_helper: orbit failsafe just with data link loss RC is like the comment says not required. --- src/modules/commander/state_machine_helper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp index 8be08a1375..a6a8c4441e 100644 --- a/src/modules/commander/state_machine_helper.cpp +++ b/src/modules/commander/state_machine_helper.cpp @@ -616,8 +616,8 @@ bool set_nav_state(vehicle_status_s *status, actuator_armed_s *armed, commander_ // is not possible and therefore the internal_state needs to be adjusted. internal_state->main_state = commander_state_s::MAIN_STATE_POSCTL; - } else if (rc_lost && !data_link_loss_act_configured && is_armed) { - // failsafe: RC is lost, datalink loss is not set up and rc loss is not disabled + } else if (rc_lost && status->data_link_lost && !data_link_loss_act_configured && is_armed) { + // Orbit does not depend on RC but while armed & all links lost & when datalink loss is not set up, we failsafe enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_rc); set_link_loss_nav_state(status, armed, status_flags, internal_state, rc_loss_act);