commander: fix offboard disarm failsafe

This commit is contained in:
Damien SIX 2022-11-07 12:06:14 +01:00 committed by Beat Küng
parent 1e39c4828f
commit 9246d38667
No known key found for this signature in database
GPG Key ID: 866DB5F0E24821BB
1 changed files with 5 additions and 0 deletions

View File

@ -467,6 +467,11 @@ FailsafeBase::Action Failsafe::checkModeFallback(const failsafe_flags_s &status_
// offboard signal
if (status_flags.offboard_control_signal_lost && (status_flags.mode_req_offboard_signal & (1u << user_intended_mode))) {
action = fromOffboardLossActParam(_param_com_obl_rc_act.get(), user_intended_mode);
// for this specific case, user_intended_mode is not modified, we shouldn't check additional fallbacks
if (action == Action::Disarm) {
return action;
}
}
// posctrl