From 186a62ceecb74399fa45fdaa2f408ca35588748a Mon Sep 17 00:00:00 2001 From: Claudio Chies <61051109+Claudio-Chies@users.noreply.github.com> Date: Tue, 9 Jul 2024 11:49:55 +0200 Subject: [PATCH 1/2] improved GCS parameter description incoperated feedback sd --- .../multicopter_altitude_mode_params.c | 2 +- .../multicopter_autonomous_params.c | 2 +- .../multicopter_position_mode_params.c | 17 ++++++++++------- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/modules/mc_pos_control/multicopter_altitude_mode_params.c b/src/modules/mc_pos_control/multicopter_altitude_mode_params.c index 3f654fade71a..9174b1ef0d83 100644 --- a/src/modules/mc_pos_control/multicopter_altitude_mode_params.c +++ b/src/modules/mc_pos_control/multicopter_altitude_mode_params.c @@ -95,7 +95,7 @@ PARAM_DEFINE_INT32(MPC_ALT_MODE, 2); /** * Maximum horizontal velocity for which position hold is enabled (use 0 to disable check) * - * Only used with MPC_POS_MODE 0 or MPC_ALT_MODE 2 + * Only used with MPC_POS_MODE Direct velocity or MPC_ALT_MODE 2 * * @unit m/s * @min 0 diff --git a/src/modules/mc_pos_control/multicopter_autonomous_params.c b/src/modules/mc_pos_control/multicopter_autonomous_params.c index 8c97e779be32..e2e453d975ed 100644 --- a/src/modules/mc_pos_control/multicopter_autonomous_params.c +++ b/src/modules/mc_pos_control/multicopter_autonomous_params.c @@ -76,7 +76,7 @@ PARAM_DEFINE_FLOAT(MPC_Z_V_AUTO_DN, 1.5f); /** * Acceleration for autonomous and for manual modes * - * When piloting manually, this parameter is only used in MPC_POS_MODE 4. + * When piloting manually, this parameter is only used in MPC_POS_MODE Acceleration based. * * @unit m/s^2 * @min 2 diff --git a/src/modules/mc_pos_control/multicopter_position_mode_params.c b/src/modules/mc_pos_control/multicopter_position_mode_params.c index 56adad1144bf..91380bccfa6a 100644 --- a/src/modules/mc_pos_control/multicopter_position_mode_params.c +++ b/src/modules/mc_pos_control/multicopter_position_mode_params.c @@ -35,12 +35,15 @@ * Position/Altitude mode variant * * The supported sub-modes are: - * 0 Sticks directly map to velocity setpoints without smoothing. - * Also applies to vertical direction and Altitude mode. - * Useful for velocity control tuning. - * 3 Sticks map to velocity but with maximum acceleration and jerk limits based on - * jerk optimized trajectory generator (different algorithm than 1). - * 4 Sticks map to acceleration and there's a virtual brake drag + * "Direct velocity" + * Sticks directly map to velocity setpoints without smoothing. + * Also applies to vertical direction and Altitude mode. + * Useful for velocity control tuning. + * "Smoothed velocity" + * Sticks map to velocity but with maximum acceleration and jerk limits based on + * jerk optimized trajectory generator (different algorithm than 1). + * "Acceleration based" + * Sticks map to acceleration and there's a virtual brake drag * * @value 0 Direct velocity * @value 3 Smoothed velocity @@ -122,7 +125,7 @@ PARAM_DEFINE_FLOAT(MPC_ACC_HOR_MAX, 5.f); * * Setting this to the maximum value essentially disables the limit. * - * Only used with smooth MPC_POS_MODE 3 and 4. + * Only used with smooth MPC_POS_MODE Smoothed velocity and Acceleration based. * * @unit m/s^3 * @min 0.5 From 54899f116431e60e72365501be0b260ebeff8219 Mon Sep 17 00:00:00 2001 From: Claudio Chies <61051109+Claudio-Chies@users.noreply.github.com> Date: Wed, 17 Jul 2024 08:25:30 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Hamish Willee --- .../multicopter_position_mode_params.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/mc_pos_control/multicopter_position_mode_params.c b/src/modules/mc_pos_control/multicopter_position_mode_params.c index 91380bccfa6a..a65ef4f5713d 100644 --- a/src/modules/mc_pos_control/multicopter_position_mode_params.c +++ b/src/modules/mc_pos_control/multicopter_position_mode_params.c @@ -35,15 +35,15 @@ * Position/Altitude mode variant * * The supported sub-modes are: - * "Direct velocity" - * Sticks directly map to velocity setpoints without smoothing. - * Also applies to vertical direction and Altitude mode. - * Useful for velocity control tuning. - * "Smoothed velocity" - * Sticks map to velocity but with maximum acceleration and jerk limits based on - * jerk optimized trajectory generator (different algorithm than 1). - * "Acceleration based" - * Sticks map to acceleration and there's a virtual brake drag + * - "Direct velocity": + * Sticks directly map to velocity setpoints without smoothing. + * Also applies to vertical direction and Altitude mode. + * Useful for velocity control tuning. + * - "Smoothed velocity": + * Sticks map to velocity but with maximum acceleration and jerk limits based on + * jerk optimized trajectory generator (different algorithm than 1). + * - "Acceleration based": + * Sticks map to acceleration and there's a virtual brake drag * * @value 0 Direct velocity * @value 3 Smoothed velocity