From 5f400946855dc3cac6e1faf133a16018bed85588 Mon Sep 17 00:00:00 2001 From: tumbili Date: Mon, 19 Oct 2015 16:10:33 +0200 Subject: [PATCH] fixed bug which lead to direct yaw control in stabilized mode --- src/modules/fw_att_control/fw_att_control_main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/fw_att_control/fw_att_control_main.cpp b/src/modules/fw_att_control/fw_att_control_main.cpp index 3e7a9f9aa8..8772ceb835 100644 --- a/src/modules/fw_att_control/fw_att_control_main.cpp +++ b/src/modules/fw_att_control/fw_att_control_main.cpp @@ -800,6 +800,10 @@ FixedwingAttitudeControl::task_main() vehicle_status_poll(); + // the position controller will not emit attitude setpoints in some modes + // we need to make sure that this flag is reset + _att_sp.fw_control_yaw = _att_sp.fw_control_yaw && _vcontrol_mode.flag_control_auto_enabled; + /* lock integrator until control is started */ bool lock_integrator;