diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp index 27288299b6..58b4579e48 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.cpp @@ -129,6 +129,11 @@ void ActuatorEffectivenessControlSurfaces::updateParams() case Type::SingleChannelAileron: break; + + case Type::SteeringWheel: + torque.setZero(); + break; + } } } @@ -146,8 +151,8 @@ bool ActuatorEffectivenessControlSurfaces::addActuators(Configuration &configura return true; } -void ActuatorEffectivenessControlSurfaces::applyFlapsAndAirbrakes(float flaps_control, float airbrakes_control, - int first_actuator_idx, +void ActuatorEffectivenessControlSurfaces::applyFlapsAirbrakesWheel(float flaps_control, float airbrakes_control, + float wheel_control, int first_actuator_idx, ActuatorVector &actuator_sp) const { for (int i = 0; i < _count; ++i) { @@ -165,6 +170,10 @@ void ActuatorEffectivenessControlSurfaces::applyFlapsAndAirbrakes(float flaps_co actuator_sp(i + first_actuator_idx) += airbrakes_control; break; + case ActuatorEffectivenessControlSurfaces::Type::SteeringWheel: + actuator_sp(i + first_actuator_idx) += wheel_control; + break; + default: break; } diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp index efb51e0d6e..bb45604ce7 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessControlSurfaces.hpp @@ -60,6 +60,7 @@ public: LeftATail = 13, RightATail = 14, SingleChannelAileron = 15, + SteeringWheel = 16, }; struct Params { @@ -80,8 +81,8 @@ public: const Params &config(int idx) const { return _params[idx]; } - void applyFlapsAndAirbrakes(float flaps_control, float airbrakes_control, int first_actuator_idx, - ActuatorVector &actuator_sp) const; + void applyFlapsAirbrakesWheel(float flaps_control, float airbrakes_control, float wheel_control, int first_actuator_idx, + ActuatorVector &actuator_sp) const; private: void updateParams() override; diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp index bddc95e913..97b7f89c0b 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessFixedWing.cpp @@ -68,8 +68,10 @@ void ActuatorEffectivenessFixedWing::updateSetpoint(const matrix::Vector