From a053b7f69b3e22c23dd823aeb7d177443e4ac781 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Tue, 15 Oct 2019 15:25:44 +0200 Subject: [PATCH] vtol_att_control_main: only reset thrust when disarmed to see flaps moving according to attitude control before arming and not have tailsitter elevons move to follow north heading. --- src/modules/vtol_att_control/vtol_att_control_main.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp index 3facf8f049..0478e13168 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -48,7 +48,6 @@ */ #include "vtol_att_control_main.h" #include -#include #include using namespace matrix; @@ -393,9 +392,7 @@ VtolAttitudeControl::Run() // reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept if (!_v_control_mode.flag_armed) { - Quatf().copyTo(_mc_virtual_att_sp.q_d); Vector3f().copyTo(_mc_virtual_att_sp.thrust_body); - Quatf().copyTo(_v_att_sp.q_d); Vector3f().copyTo(_v_att_sp.thrust_body); } @@ -414,9 +411,7 @@ VtolAttitudeControl::Run() if (mc_att_sp_updated) { // reinitialize the setpoint while not armed to make sure no value from the last mode or flight is still kept if (!_v_control_mode.flag_armed) { - Quatf().copyTo(_mc_virtual_att_sp.q_d); Vector3f().copyTo(_mc_virtual_att_sp.thrust_body); - Quatf().copyTo(_v_att_sp.q_d); Vector3f().copyTo(_v_att_sp.thrust_body); } }