mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 23:00:34 +08:00
fixed-wing: set yaw_sp to yaw_current instead of 0 when not controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Roman Bapst
parent
da4d6dc657
commit
b53808d11b
@@ -693,7 +693,7 @@ FixedwingPositionControl::set_control_mode_current(bool pos_sp_curr_valid)
|
||||
/* reset setpoints from other modes (auto) otherwise we won't
|
||||
* level out without new manual input */
|
||||
_att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get());
|
||||
_att_sp.yaw_body = 0;
|
||||
_att_sp.yaw_body = _yaw; // yaw is not controlled, so set setpoint to current yaw
|
||||
}
|
||||
|
||||
_control_mode_current = FW_POSCTRL_MODE_POSITION;
|
||||
@@ -1681,7 +1681,7 @@ FixedwingPositionControl::control_altitude(const hrt_abstime &now, const Vector2
|
||||
_manual_height_rate_setpoint_m_s);
|
||||
|
||||
_att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get());
|
||||
_att_sp.yaw_body = 0;
|
||||
_att_sp.yaw_body = _yaw; // yaw is not controlled, so set setpoint to current yaw
|
||||
|
||||
/* Copy thrust and pitch values from tecs */
|
||||
if (_landed) {
|
||||
@@ -1800,7 +1800,7 @@ FixedwingPositionControl::control_position(const hrt_abstime &now, const Vector2
|
||||
}
|
||||
|
||||
_att_sp.roll_body = roll_sp_new;
|
||||
_att_sp.yaw_body = 0;
|
||||
_att_sp.yaw_body = _yaw; // yaw is not controlled, so set setpoint to current yaw
|
||||
}
|
||||
|
||||
/* Copy thrust and pitch values from tecs */
|
||||
|
||||
Reference in New Issue
Block a user