From bc7178c538f557f6989ccd1b5a5ed2ca6126d4ab Mon Sep 17 00:00:00 2001
From: sander <sander@droneslab.com>
Date: Thu, 4 Aug 2016 11:26:21 +0200
Subject: [PATCH] Allow mission with active DL and DLL failsafe off

---
 src/modules/commander/state_machine_helper.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index 0b0d833d77..e279ee159a 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -801,10 +801,9 @@ bool set_nav_state(struct vehicle_status_s *status, struct commander_state_s *in
 
 			/* datalink loss disabled:
 			 * check if both, RC and datalink are lost during the mission
-			 * or RC is lost after the mission finishes in air: this should always trigger RCRECOVER */
+			 * or all links are lost after the mission finishes in air: this should always trigger RCRECOVER */
 
-		} else if (!data_link_loss_enabled && ((status->rc_signal_lost && status->data_link_lost) ||
-						       (status->rc_signal_lost && !landed && mission_finished))) {
+		} else if (!data_link_loss_enabled && status->rc_signal_lost && status->data_link_lost && !landed && mission_finished) {
 			status->failsafe = true;
 
 			if (status_flags->condition_global_position_valid && status_flags->condition_home_position_valid) {
-- 
GitLab