From 625dc67f84294c2f8c343517bfc4044bad543b39 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 3 Jun 2017 11:47:28 -0400 Subject: [PATCH] commander offboard loss rc act unreachable - coverity fix 145492 --- src/modules/commander/state_machine_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp index 5697b8c011d7..6b5fab9f870a 100644 --- a/src/modules/commander/state_machine_helper.cpp +++ b/src/modules/commander/state_machine_helper.cpp @@ -808,7 +808,7 @@ bool set_nav_state(struct vehicle_status_s *status, if (status_flags->offboard_control_signal_lost && !status->rc_signal_lost) { enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_offboard); - if (status_flags->offboard_control_loss_timeout && offb_loss_rc_act < 5 && offb_loss_rc_act >= 0) { + if (status_flags->offboard_control_loss_timeout && offb_loss_rc_act < 6 && offb_loss_rc_act >= 0) { if (offb_loss_rc_act == 3 && status_flags->condition_global_position_valid && status_flags->condition_home_position_valid) { status->nav_state = vehicle_status_s::NAVIGATION_STATE_AUTO_RTL;