Skip to content

Commit 857b48d

Browse files
authored
[1.17] Bugfix: Prevent Offboard to Position without RC (#26391)
1 parent 618995d commit 857b48d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/modules/commander/failsafe/failsafe.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,15 @@ FailsafeBase::Action Failsafe::checkModeFallback(const failsafe_flags_s &status_
669669
if (action == Action::Disarm) {
670670
return action;
671671
}
672+
673+
if (action == Action::FallbackPosCtrl || action == Action::FallbackAltCtrl || action == Action::FallbackStab) {
674+
// Check if RC is available, if not use the mode specified in NAV_RCL_ACT
675+
if (status_flags.manual_control_signal_lost) {
676+
ActionOptions rc_loss_action = fromNavDllOrRclActParam(_param_nav_rcl_act.get());
677+
action = rc_loss_action.action;
678+
}
679+
680+
}
672681
}
673682

674683
// PosCtrl/PositionSlow -> AltCtrl

0 commit comments

Comments
 (0)