mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 02:36:37 +08:00
tailsitter: Fix differential thrust in FW mode.
Signed-off-by: Ricardo Marques <marques.ricardo17@gmail.com>
This commit is contained in:
committed by
Silvan Fuhrer
parent
e4d223f098
commit
78c05275d2
@@ -277,11 +277,6 @@ void Tailsitter::update_fw_state()
|
||||
{
|
||||
VtolType::update_fw_state();
|
||||
|
||||
// allow fw yawrate control via multirotor roll actuation. this is useful for vehicles
|
||||
// which don't have a rudder to coordinate turns
|
||||
if (_params->diff_thrust == 1) {
|
||||
_mc_roll_weight = 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -302,6 +297,11 @@ void Tailsitter::fill_actuator_outputs()
|
||||
if (_vtol_schedule.flight_mode == vtol_mode::FW_MODE) {
|
||||
mc_out[actuator_controls_s::INDEX_THROTTLE] = fw_in[actuator_controls_s::INDEX_THROTTLE];
|
||||
|
||||
/* allow differential thrust if enabled */
|
||||
if (_params->diff_thrust == 1) {
|
||||
mc_out[actuator_controls_s::INDEX_ROLL] = fw_in[actuator_controls_s::INDEX_YAW] * _params->diff_thrust_scale;
|
||||
}
|
||||
|
||||
} else {
|
||||
mc_out[actuator_controls_s::INDEX_THROTTLE] = mc_in[actuator_controls_s::INDEX_THROTTLE];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user