From 262a17eb571382b2159cad5e88d285a1c4717716 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Thu, 14 Nov 2024 11:56:14 +0000 Subject: [PATCH 01/15] control_allocator: Added linearization feature for heli swashplates to help prevent servo binding --- .../ActuatorEffectivenessHelicopter.cpp | 31 +++++++++++++++++++ .../ActuatorEffectivenessHelicopter.hpp | 7 +++++ src/modules/control_allocator/module.yaml | 28 +++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index f403424b678c..7bf63812f52c 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -65,6 +65,8 @@ ActuatorEffectivenessHelicopter::ActuatorEffectivenessHelicopter(ModuleParams *p _param_handles.yaw_throttle_scale = param_find("CA_HELI_YAW_TH_S"); _param_handles.yaw_ccw = param_find("CA_HELI_YAW_CCW"); _param_handles.spoolup_time = param_find("COM_SPOOLUP_TIME"); + _param_handles.linearize_servos = param_find("CA_LIN_SERVO"); + _param_handles.max_sevo_throw = param_find("CA_MAX_SVO_THROW"); updateParams(); } @@ -102,6 +104,14 @@ void ActuatorEffectivenessHelicopter::updateParams() int32_t yaw_ccw = 0; param_get(_param_handles.yaw_ccw, &yaw_ccw); _geometry.yaw_sign = (yaw_ccw == 1) ? -1.f : 1.f; + int32_t linearize_servos = 0; + param_get(_param_handles.linearize_servos, &linearize_servos); + _geometry.linearize_servos = (linearize_servos != 0); + float max_sevo_throw = 0.f; + param_get(_param_handles.max_sevo_throw, &max_sevo_throw); + max_sevo_throw *= M_PI_F / 180.0f; //converting deg to rad + _geometry.max_sevo_height = sinf(max_sevo_throw); + _geometry.inverse_max_servo_throw = 1/max_sevo_throw; } bool ActuatorEffectivenessHelicopter::getEffectivenessMatrix(Configuration &configuration, @@ -162,6 +172,11 @@ void ActuatorEffectivenessHelicopter::updateSetpoint(const matrix::Vector Date: Tue, 19 Nov 2024 09:57:35 +0000 Subject: [PATCH 02/15] Apply suggestions from code review Co-authored-by: Mathieu Bresciani --- .../ActuatorEffectivenessHelicopter.cpp | 13 ++++++------- .../ActuatorEffectivenessHelicopter.hpp | 4 ++-- src/modules/control_allocator/module.yaml | 10 +++++----- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 7bf63812f52c..e291b9043793 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -107,11 +107,11 @@ void ActuatorEffectivenessHelicopter::updateParams() int32_t linearize_servos = 0; param_get(_param_handles.linearize_servos, &linearize_servos); _geometry.linearize_servos = (linearize_servos != 0); - float max_sevo_throw = 0.f; - param_get(_param_handles.max_sevo_throw, &max_sevo_throw); - max_sevo_throw *= M_PI_F / 180.0f; //converting deg to rad - _geometry.max_sevo_height = sinf(max_sevo_throw); - _geometry.inverse_max_servo_throw = 1/max_sevo_throw; + float max_servo_throw_deg = 0.f; + param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); + const float max_servo_throw = math::radians(max_servo_throw) + _geometry.max_servo_height = sinf(max_servo_throw); + _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; } bool ActuatorEffectivenessHelicopter::getEffectivenessMatrix(Configuration &configuration, @@ -191,13 +191,12 @@ void ActuatorEffectivenessHelicopter::updateSetpoint(const matrix::Vector Date: Tue, 19 Nov 2024 10:00:18 +0000 Subject: [PATCH 03/15] update description of CA_LIN_SERVO parameter --- src/modules/control_allocator/module.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 3af4f42814d7..17e30fd7e39e 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -532,7 +532,7 @@ parameters: description: short: linearize servo output long: | - This linearizes the swashplate servo's mechanical output to account for nonlinear output due to arm rotation. Should only be necessary with specific swashplate setups using 4 servos and requires specific setup to work properly. The servo arm must be centered on the mechanical throw at the servo trim position and the servo trim position kept as close to 1500 as possible. If the spline on the servo control horn is not allowing you to get the servo arm perpendicular to the shaft, the use the servo trim parameters to make them perpendicular to the shaft. Leveling the swashplate can only be done using the linkages. set your linkages so that the swashplate in its mid position will give you required collective for hover. + Linearize the servo's mechanical output attached to a 4-servos swashplate. Requires setting the servo range of motion using CA_MAX_SVO_THROW. type: boolean default: 0 CA_MAX_SVO_THROW: From 70ddeb7a9ec637d955d82338ebd05b2a680f548e Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 19 Nov 2024 10:14:26 +0000 Subject: [PATCH 04/15] update variable name --- .../ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index e291b9043793..f972df647d88 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -66,7 +66,7 @@ ActuatorEffectivenessHelicopter::ActuatorEffectivenessHelicopter(ModuleParams *p _param_handles.yaw_ccw = param_find("CA_HELI_YAW_CCW"); _param_handles.spoolup_time = param_find("COM_SPOOLUP_TIME"); _param_handles.linearize_servos = param_find("CA_LIN_SERVO"); - _param_handles.max_sevo_throw = param_find("CA_MAX_SVO_THROW"); + _param_handles.max_servo_throw = param_find("CA_MAX_SVO_THROW"); updateParams(); } @@ -194,7 +194,7 @@ float ActuatorEffectivenessHelicopter::getLinearServoOutput(float input) const input = math::constrain(input, -1.0f, 1.0f); //servo output is calculated by normalizing input to arm rotation of CA_MAX_SVO_THROW degrees as full input for a linear throw - float svo_height = _geometry.max_sevo_height * input; + float svo_height = _geometry.max_servo_height * input; if (!PX4_ISFINITE(svo_height)) { svo_height = 0.0f; From 84e3c301ae8fed8ac3018066a3fdc9a13a167a75 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 19 Nov 2024 11:23:03 +0000 Subject: [PATCH 05/15] add missing semi-colon --- .../ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index f972df647d88..316671432a42 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -109,7 +109,7 @@ void ActuatorEffectivenessHelicopter::updateParams() _geometry.linearize_servos = (linearize_servos != 0); float max_servo_throw_deg = 0.f; param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); - const float max_servo_throw = math::radians(max_servo_throw) + const float max_servo_throw = math::radians(max_servo_throw); _geometry.max_servo_height = sinf(max_servo_throw); _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; } From 66550f4e7c3c3eb2b76932f43430dfa9faea2b12 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 19 Nov 2024 11:27:02 +0000 Subject: [PATCH 06/15] fix variable referenced before assignment --- .../ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 316671432a42..5917dbc551be 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -109,7 +109,7 @@ void ActuatorEffectivenessHelicopter::updateParams() _geometry.linearize_servos = (linearize_servos != 0); float max_servo_throw_deg = 0.f; param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); - const float max_servo_throw = math::radians(max_servo_throw); + const float max_servo_throw = math::radians(max_servo_throw_deg); _geometry.max_servo_height = sinf(max_servo_throw); _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; } From b431590eaa8e0107159eeb7e64593cf62efa0c7b Mon Sep 17 00:00:00 2001 From: Ted <86834177+TedObrien@users.noreply.github.com> Date: Mon, 25 Nov 2024 09:20:55 +0000 Subject: [PATCH 07/15] add missing indentation Co-authored-by: Mathieu Bresciani --- .../ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 5917dbc551be..71166f6fbb53 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -174,7 +174,7 @@ void ActuatorEffectivenessHelicopter::updateSetpoint(const matrix::Vector Date: Thu, 5 Dec 2024 09:34:48 +0000 Subject: [PATCH 08/15] removed param unnecessary param --- .../ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp index 798cfecaedb5..13490db6e6c3 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp @@ -120,7 +120,6 @@ class ActuatorEffectivenessHelicopter : public ModuleParams, public ActuatorEffe param_t spoolup_time; param_t linearize_servos; param_t max_servo_throw; - param_t inverse_max_servo_throw; }; ParamHandles _param_handles{}; From 198793a4560e34806e6830349e4dab30fd0cc849 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Thu, 5 Dec 2024 09:37:03 +0000 Subject: [PATCH 09/15] removed whitespace --- src/modules/control_allocator/module.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 17e30fd7e39e..939c80fa6c9f 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -1149,7 +1149,6 @@ mixer: - label: 'Min/max servo throw in degrees' name: CA_MAX_SVO_THROW - 12: # Helicopter (Coaxial) actuators: - actuator_type: 'motor' From 855187deead51d290ad6c5075d86f5ad4eb1dae3 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 7 Jan 2025 14:31:55 +0000 Subject: [PATCH 10/15] remove CA_LIN_SERVO and enable feature if CA_MAX_SERVO_THROW > 0 plus Update param description. --- .../ActuatorEffectivenessHelicopter.cpp | 19 ++++++++++++------- .../ActuatorEffectivenessHelicopter.hpp | 1 - src/modules/control_allocator/module.yaml | 19 ++++--------------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 71166f6fbb53..2fc23c5a66a7 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -65,7 +65,6 @@ ActuatorEffectivenessHelicopter::ActuatorEffectivenessHelicopter(ModuleParams *p _param_handles.yaw_throttle_scale = param_find("CA_HELI_YAW_TH_S"); _param_handles.yaw_ccw = param_find("CA_HELI_YAW_CCW"); _param_handles.spoolup_time = param_find("COM_SPOOLUP_TIME"); - _param_handles.linearize_servos = param_find("CA_LIN_SERVO"); _param_handles.max_servo_throw = param_find("CA_MAX_SVO_THROW"); updateParams(); @@ -104,14 +103,20 @@ void ActuatorEffectivenessHelicopter::updateParams() int32_t yaw_ccw = 0; param_get(_param_handles.yaw_ccw, &yaw_ccw); _geometry.yaw_sign = (yaw_ccw == 1) ? -1.f : 1.f; - int32_t linearize_servos = 0; - param_get(_param_handles.linearize_servos, &linearize_servos); - _geometry.linearize_servos = (linearize_servos != 0); float max_servo_throw_deg = 0.f; param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); - const float max_servo_throw = math::radians(max_servo_throw_deg); - _geometry.max_servo_height = sinf(max_servo_throw); - _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; + + if (max_servo_throw_deg > 0.f){ + const float max_servo_throw = math::radians(max_servo_throw_deg); + _geometry.max_servo_height = sinf(max_servo_throw); + _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; + _geometry.linearize_servos = 1; + } else { + // handle any undefined behaviour + _geometry.max_servo_height = 0.f; + _geometry.inverse_max_servo_throw = 0.f; + _geometry.linearize_servos = 0; + } } bool ActuatorEffectivenessHelicopter::getEffectivenessMatrix(Configuration &configuration, diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp index 13490db6e6c3..57d1de2c919b 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.hpp @@ -118,7 +118,6 @@ class ActuatorEffectivenessHelicopter : public ModuleParams, public ActuatorEffe param_t yaw_throttle_scale; param_t yaw_ccw; param_t spoolup_time; - param_t linearize_servos; param_t max_servo_throw; }; ParamHandles _param_handles{}; diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 939c80fa6c9f..44fe5697880b 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -528,25 +528,18 @@ parameters: which is mostly the case when the main rotor turns counter-clockwise. type: boolean default: 0 - CA_LIN_SERVO: - description: - short: linearize servo output - long: | - Linearize the servo's mechanical output attached to a 4-servos swashplate. Requires setting the servo range of motion using CA_MAX_SVO_THROW. - type: boolean - default: 0 CA_MAX_SVO_THROW: description: - short: Defines max/min throw of servo. + short: Defines max/min throw of servo for linearization. Set to zero to disable. long: | - Defines min/max throw of servo when linearizing servo output. Only used when CA_LIN_SERVO is enabled. + Defines min/max throw of servo. Used to linearize mechanical output of servo attached to a 4-servo swashplate. Setting to zero to disables feature. type: float decimal: 3 unit: deg increment: 0.1 - min: 5 + min: 0 max: 75 - default: 50.0 + default: 0.0 # Others CA_FAILURE_MODE: @@ -1111,8 +1104,6 @@ mixer: name: CA_HELI_YAW_CCW - label: 'Throttle spoolup time' name: COM_SPOOLUP_TIME - - label: 'Linearize servos' - name: CA_LIN_SERVO - label: 'Min/max servo throw in degrees' name: CA_MAX_SVO_THROW @@ -1144,8 +1135,6 @@ mixer: name: CA_HELI_YAW_CCW - label: 'Throttle spoolup time' name: COM_SPOOLUP_TIME - - label: 'Linearize servos' - name: CA_LIN_SERVO - label: 'Min/max servo throw in degrees' name: CA_MAX_SVO_THROW From fcda9fdc63cebcf674b9a3cdbc54725e1d99102a Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 7 Jan 2025 14:35:12 +0000 Subject: [PATCH 11/15] remove CA_MAX_SVO_THROW from actuators tab to avoid confusion during standard swashplate setup. --- src/modules/control_allocator/module.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 44fe5697880b..c9babcc6d42e 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -1104,8 +1104,6 @@ mixer: name: CA_HELI_YAW_CCW - label: 'Throttle spoolup time' name: COM_SPOOLUP_TIME - - label: 'Min/max servo throw in degrees' - name: CA_MAX_SVO_THROW 11: # Helicopter (tail Servo) actuators: @@ -1135,8 +1133,6 @@ mixer: name: CA_HELI_YAW_CCW - label: 'Throttle spoolup time' name: COM_SPOOLUP_TIME - - label: 'Min/max servo throw in degrees' - name: CA_MAX_SVO_THROW 12: # Helicopter (Coaxial) actuators: From 6690d8d3ccfeb0bc7312cb68ea42af6aa0f1ec5c Mon Sep 17 00:00:00 2001 From: TedObrien Date: Tue, 7 Jan 2025 16:33:06 +0000 Subject: [PATCH 12/15] added comment and fixed spelling mistake --- .../ActuatorEffectivenessHelicopter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 2fc23c5a66a7..9ce03b555bd8 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -107,12 +107,13 @@ void ActuatorEffectivenessHelicopter::updateParams() param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); if (max_servo_throw_deg > 0.f){ + //linearization feature enabled const float max_servo_throw = math::radians(max_servo_throw_deg); _geometry.max_servo_height = sinf(max_servo_throw); _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; _geometry.linearize_servos = 1; } else { - // handle any undefined behaviour + // handle any undefined behaviour if disabled _geometry.max_servo_height = 0.f; _geometry.inverse_max_servo_throw = 0.f; _geometry.linearize_servos = 0; @@ -177,7 +178,7 @@ void ActuatorEffectivenessHelicopter::updateSetpoint(const matrix::Vector Date: Thu, 9 Jan 2025 14:39:13 +0000 Subject: [PATCH 13/15] fix spelling mistake --- src/modules/control_allocator/module.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index c9babcc6d42e..37a29669da47 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -532,7 +532,7 @@ parameters: description: short: Defines max/min throw of servo for linearization. Set to zero to disable. long: | - Defines min/max throw of servo. Used to linearize mechanical output of servo attached to a 4-servo swashplate. Setting to zero to disables feature. + Defines min/max throw of servo. Used to linearize mechanical output of servo attached to a 4-servo swashplate. Setting to zero disables feature. type: float decimal: 3 unit: deg From f968b0f7337d8525498b54aefd2be28b3d21efb4 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Thu, 9 Jan 2025 14:49:56 +0000 Subject: [PATCH 14/15] fix formatting --- .../ActuatorEffectivenessHelicopter.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp index 9ce03b555bd8..dd0965c01c39 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessHelicopter.cpp @@ -106,16 +106,17 @@ void ActuatorEffectivenessHelicopter::updateParams() float max_servo_throw_deg = 0.f; param_get(_param_handles.max_servo_throw, &max_servo_throw_deg); - if (max_servo_throw_deg > 0.f){ + if (max_servo_throw_deg > 0.f) { //linearization feature enabled const float max_servo_throw = math::radians(max_servo_throw_deg); _geometry.max_servo_height = sinf(max_servo_throw); _geometry.inverse_max_servo_throw = 1.f / max_servo_throw; _geometry.linearize_servos = 1; + } else { // handle any undefined behaviour if disabled - _geometry.max_servo_height = 0.f; - _geometry.inverse_max_servo_throw = 0.f; + _geometry.max_servo_height = 0.f; + _geometry.inverse_max_servo_throw = 0.f; _geometry.linearize_servos = 0; } } From 258108564d936743aa89c10d75ea5ca06dbb7874 Mon Sep 17 00:00:00 2001 From: TedObrien Date: Thu, 9 Jan 2025 15:03:13 +0000 Subject: [PATCH 15/15] reduce CA_MAX_SVO_THROW short description length to stop test failure --- src/modules/control_allocator/module.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/control_allocator/module.yaml b/src/modules/control_allocator/module.yaml index 37a29669da47..ff2b79886391 100644 --- a/src/modules/control_allocator/module.yaml +++ b/src/modules/control_allocator/module.yaml @@ -530,7 +530,7 @@ parameters: default: 0 CA_MAX_SVO_THROW: description: - short: Defines max/min throw of servo for linearization. Set to zero to disable. + short: Defines max/min throw of servo for linearization long: | Defines min/max throw of servo. Used to linearize mechanical output of servo attached to a 4-servo swashplate. Setting to zero disables feature. type: float