mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
VTOL Tailsitter: fix motor spikes to 0 when starting back transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -301,11 +301,17 @@ void Tailsitter::fill_actuator_outputs()
|
||||
}
|
||||
|
||||
} else {
|
||||
_thrust_setpoint_0->xyz[2] = _vehicle_thrust_setpoint_virtual_mc->xyz[2];
|
||||
|
||||
// for the short period after starting the backtransition where there is no thrust published yet from the MC controller,
|
||||
// keep publishing the last FW thrust to keep the motors running
|
||||
if (_vtol_mode == vtol_mode::TRANSITION_BACK && _time_since_trans_start < 0.05f) {
|
||||
_thrust_setpoint_0->xyz[2] = -_last_thr_in_fw_mode;
|
||||
}
|
||||
|
||||
_torque_setpoint_0->xyz[0] = _vehicle_torque_setpoint_virtual_mc->xyz[0];
|
||||
_torque_setpoint_0->xyz[1] = _vehicle_torque_setpoint_virtual_mc->xyz[1];
|
||||
_torque_setpoint_0->xyz[2] = _vehicle_torque_setpoint_virtual_mc->xyz[2];
|
||||
|
||||
_thrust_setpoint_0->xyz[2] = _vehicle_thrust_setpoint_virtual_mc->xyz[2];
|
||||
}
|
||||
|
||||
// Control surfaces
|
||||
|
||||
Reference in New Issue
Block a user