From 6b3e3aa363f2cf8425fa06d8e7db4d30422d1886 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Wed, 14 Aug 2024 14:45:50 +0200 Subject: [PATCH] Commander: improve param description of COM_POSCTL_NAVL and rename Manual-->Stabilized Signed-off-by: Silvan Fuhrer --- src/modules/commander/commander_params.c | 28 +++++++++------------ src/modules/commander/failsafe/failsafe.cpp | 2 +- src/modules/commander/failsafe/failsafe.h | 2 +- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/modules/commander/commander_params.c b/src/modules/commander/commander_params.c index 0b20831a6e..72dadca8fa 100644 --- a/src/modules/commander/commander_params.c +++ b/src/modules/commander/commander_params.c @@ -338,14 +338,14 @@ PARAM_DEFINE_INT32(COM_QC_ACT, 0); * The offboard loss failsafe will only be entered after a timeout, * set by COM_OF_LOSS_T in seconds. * - * @value 0 Position mode - * @value 1 Altitude mode - * @value 2 Manual - * @value 3 Return mode - * @value 4 Land mode - * @value 5 Hold mode - * @value 6 Terminate - * @value 7 Disarm + * @value 0 Position mode + * @value 1 Altitude mode + * @value 2 Stabilized + * @value 3 Return mode + * @value 4 Land mode + * @value 5 Hold mode + * @value 6 Terminate + * @value 7 Disarm * @group Commander */ PARAM_DEFINE_INT32(COM_OBL_RC_ACT, 0); @@ -453,16 +453,12 @@ PARAM_DEFINE_FLOAT(COM_RC_STICK_OV, 30.0f); PARAM_DEFINE_INT32(COM_ARM_MIS_REQ, 0); /** - * Position control navigation loss response. + * Position mode navigation loss response * - * This sets the flight mode that will be used if navigation accuracy is no longer adequate for position control. + * This sets the flight mode that will be used if navigation accuracy is no longer adequate for position control in manual Position mode. * - * If Altitude/Manual is selected: assume use of remote control after fallback. Switch to Altitude mode if a height estimate is available, else switch to MANUAL. - * - * If Land/Descend is selected: assume no use of remote control after fallback. Switch to Land mode if a height estimate is available, else switch to Descend. - * - * @value 0 Altitude/Manual - * @value 1 Land/Descend + * @value 0 Altitude mode + * @value 1 Land mode (descend) * * @group Commander */ diff --git a/src/modules/commander/failsafe/failsafe.cpp b/src/modules/commander/failsafe/failsafe.cpp index f868d67408..926bdfe44d 100644 --- a/src/modules/commander/failsafe/failsafe.cpp +++ b/src/modules/commander/failsafe/failsafe.cpp @@ -292,7 +292,7 @@ FailsafeBase::Action Failsafe::fromOffboardLossActParam(int param_value, uint8_t user_intended_mode = vehicle_status_s::NAVIGATION_STATE_ALTCTL; break; - case offboard_loss_failsafe_mode::Manual: + case offboard_loss_failsafe_mode::Stabilized: action = Action::FallbackStab; user_intended_mode = vehicle_status_s::NAVIGATION_STATE_STAB; break; diff --git a/src/modules/commander/failsafe/failsafe.h b/src/modules/commander/failsafe/failsafe.h index 1c1b8bd865..742b84ce36 100644 --- a/src/modules/commander/failsafe/failsafe.h +++ b/src/modules/commander/failsafe/failsafe.h @@ -70,7 +70,7 @@ private: enum class offboard_loss_failsafe_mode : int32_t { Position_mode = 0, Altitude_mode = 1, - Manual = 2, + Stabilized = 2, Return_mode = 3, Land_mode = 4, Hold_mode = 5,