From bfc1e36f455decff16a8021291a847a47a17335c Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Thu, 27 Apr 2023 17:30:36 +0200 Subject: [PATCH] Standard: fill att_sp.thrust[0] with _pusher_thr value during transition to FW (#21520) Once passed the transition and in FW mode, it takes some ms unitl the FW att sp is updated by the FW att controller. During this time the last published attitude sp is kept bein used, which is the one that was published during transition. So let's fill the thrust[0] of it. Signed-off-by: Silvan Fuhrer --- src/modules/vtol_att_control/standard.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/vtol_att_control/standard.cpp b/src/modules/vtol_att_control/standard.cpp index 95d2821562d1..9be4ce5b3ec6 100644 --- a/src/modules/vtol_att_control/standard.cpp +++ b/src/modules/vtol_att_control/standard.cpp @@ -226,6 +226,8 @@ void Standard::update_transition_state() // ramp up FW_PSP_OFF _v_att_sp->pitch_body = math::radians(_param_fw_psp_off.get()) * (1.0f - mc_weight); + _v_att_sp->thrust_body[0] = _pusher_throttle; + const Quatf q_sp(Eulerf(_v_att_sp->roll_body, _v_att_sp->pitch_body, _v_att_sp->yaw_body)); q_sp.copyTo(_v_att_sp->q_d);