From d30760a2eace42bf10176d01b36fe48efdb74fde Mon Sep 17 00:00:00 2001 From: Jaeyoung-Lim Date: Sun, 8 Aug 2021 17:02:46 +0200 Subject: [PATCH] Remove flap scaling to prevent flaps being deployed in manual mode This commit restores the flap scaling since it was always getting deployed in manual flight modes --- src/modules/fw_att_control/FixedwingAttitudeControl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index 65086c0180..4d26c09d01 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -655,7 +655,7 @@ void FixedwingAttitudeControl::control_flaps(const float dt) /* map flaps by default to manual if valid */ if (PX4_ISFINITE(_manual_control_setpoint.flaps) && _vcontrol_mode.flag_control_manual_enabled && fabsf(_param_fw_flaps_scl.get()) > 0.01f) { - flap_control = 0.5f * (_manual_control_setpoint.flaps + 1.0f) * _param_fw_flaps_scl.get(); + flap_control = _manual_control_setpoint.flaps * _param_fw_flaps_scl.get(); } else if (_vcontrol_mode.flag_control_auto_enabled && fabsf(_param_fw_flaps_scl.get()) > 0.01f) {