From 81c46b6f92842a5528d079a2e10ad89b4d56ea95 Mon Sep 17 00:00:00 2001 From: bresch Date: Thu, 6 Jul 2017 16:54:22 +0200 Subject: [PATCH] VTOL Standard - Disable pusher-for-pitch strategy in manual control --- src/modules/vtol_att_control/standard.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/vtol_att_control/standard.cpp b/src/modules/vtol_att_control/standard.cpp index 50995b08a3..028ca85911 100644 --- a/src/modules/vtol_att_control/standard.cpp +++ b/src/modules/vtol_att_control/standard.cpp @@ -356,8 +356,10 @@ void Standard::update_mc_state() _flag_enable_mc_motors = false; } - // if the thrust scale param is zero then the pusher-for-pitch strategy is disabled and we can return - if (_params_standard.forward_thrust_scale < FLT_EPSILON) { + // if the thrust scale param is zero or the drone is on manual mode, + // then the pusher-for-pitch strategy is disabled and we can return + if (_params_standard.forward_thrust_scale < FLT_EPSILON || + !_v_control_mode->flag_control_position_enabled) { return; }