Skip to content

Commit

Permalink
FW Attitude Controller: fix manual yaw rate setpoint limit (PX4#22812)
Browse files Browse the repository at this point in the history
Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer authored and Peize-Liu committed Mar 24, 2024
1 parent 7f9dfca commit 2a75852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/fw_att_control/FixedwingAttitudeControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void FixedwingAttitudeControl::Run()

/* add yaw rate setpoint from sticks in all attitude-controlled modes */
if (_vcontrol_mode.flag_control_manual_enabled) {
body_rates_setpoint(2) += math::constrain(_manual_control_setpoint.yaw * radians(_param_fw_y_rmax.get()),
body_rates_setpoint(2) += math::constrain(_manual_control_setpoint.yaw * radians(_param_man_yr_max.get()),
-radians(_param_fw_y_rmax.get()), radians(_param_fw_y_rmax.get()));
}

Expand Down
3 changes: 2 additions & 1 deletion src/modules/fw_att_control/FixedwingAttitudeControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ class FixedwingAttitudeControl final : public ModuleBase<FixedwingAttitudeContro
(ParamFloat<px4::params::FW_WR_IMAX>) _param_fw_wr_imax,
(ParamFloat<px4::params::FW_WR_P>) _param_fw_wr_p,

(ParamFloat<px4::params::FW_Y_RMAX>) _param_fw_y_rmax
(ParamFloat<px4::params::FW_Y_RMAX>) _param_fw_y_rmax,
(ParamFloat<px4::params::FW_MAN_YR_MAX>) _param_man_yr_max

)

Expand Down

0 comments on commit 2a75852

Please sign in to comment.