From 089673ff35a1afa84e551404185e67d2cb868fe9 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Wed, 27 Apr 2022 20:32:06 +0200 Subject: [PATCH] only allow positive spoiler and flap controls Signed-off-by: Silvan Fuhrer --- .../ActuatorEffectivenessTiltrotorVTOL.cpp | 6 +++--- src/modules/fw_att_control/FixedwingAttitudeControl.cpp | 4 ++-- src/modules/vtol_att_control/vtol_type.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp index df9fa7162b..f815b53e83 100644 --- a/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp +++ b/src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp @@ -98,9 +98,9 @@ void ActuatorEffectivenessTiltrotorVTOL::updateSetpoint(const matrix::Vectorvt_spoiler_mc_ld; } - _spoiler_setpoint_with_slewrate.update(spoiler_setpoint_hover, _dt); + _spoiler_setpoint_with_slewrate.update(math::constrain(spoiler_setpoint_hover, 0.f, 1.f), _dt); _flaps_setpoint_with_slewrate.update(0.f, _dt); }