Remove COM_POSCTL_NAVL

In an effort to reduce configuration space.
I've not seen use for this option.
If a pilot flies manually in position mode he has some visual reference of the vehicle and can do better than an autonomous mode without position reference.
Also by now we have nudging in Descend mode so the pilot can still give input and the only difference is it automatically goes down instead of the pilot having to descend by stick to land.
This commit is contained in:
Matthias Grob authored and Silvan Fuhrer committed 2025-09-08 09:41:52 +02:00
1 parent 3962419669
commit e0cdcdb436
12 files changed
+20 -86

No files matched your search

+12 -38
View File
@@ -668,46 +668,20 @@ FailsafeBase::Action Failsafe::checkModeFallback(const failsafe_flags_s &status_
}
}
// posctrl
switch (position_control_navigation_loss_response(_param_com_posctl_navl.get())) {
case position_control_navigation_loss_response::Altitude_Manual: // AltCtrl/Manual
// PosCtrl/PositionSlow -> AltCtrl
if ((user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSCTL ||
user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSITION_SLOW)
&& !modeCanRun(status_flags, user_intended_mode)) {
action = Action::FallbackAltCtrl;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_ALTCTL;
}
// AltCtrl -> Stabilized
if (user_intended_mode == vehicle_status_s::NAVIGATION_STATE_ALTCTL
&& !modeCanRun(status_flags, user_intended_mode)) {
action = Action::FallbackStab;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_STAB;
}
break;
case position_control_navigation_loss_response::Land_Descend: // Land/Terminate
// PosCtrl/PositionSlow -> Land
if ((user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSCTL ||
user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSITION_SLOW)
&& !modeCanRun(status_flags, user_intended_mode)) {
action = Action::Land;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_AUTO_LAND;
// Land -> Descend
if (!modeCanRun(status_flags, user_intended_mode)) {
action = Action::Descend;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_DESCEND;
}
}
break;
// PosCtrl/PositionSlow -> AltCtrl
if ((user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSCTL ||
user_intended_mode == vehicle_status_s::NAVIGATION_STATE_POSITION_SLOW)
&& !modeCanRun(status_flags, user_intended_mode)) {
action = Action::FallbackAltCtrl;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_ALTCTL;
}
// AltCtrl -> Stabilized
if (user_intended_mode == vehicle_status_s::NAVIGATION_STATE_ALTCTL
&& !modeCanRun(status_flags, user_intended_mode)) {
action = Action::FallbackStab;
user_intended_mode = vehicle_status_s::NAVIGATION_STATE_STAB;
}
// Last, check can_run for intended mode
if (!modeCanRun(status_flags, user_intended_mode)) {