Skip to content
Snippets Groups Projects
Commit c665c34d authored by Beat Küng's avatar Beat Küng
Browse files

MC stabilized: allow yaw control at 0 throttle if yaw-airmode is selected

parent 24dc3169
No related branches found
No related tags found
No related merge requests found
......@@ -269,7 +269,9 @@ private:
(ParamFloat<px4::params::MPC_MANTHR_MIN>) _man_throttle_min, /**< minimum throttle for stabilized */
(ParamFloat<px4::params::MPC_THR_MAX>) _throttle_max, /**< maximum throttle for stabilized */
(ParamFloat<px4::params::MPC_THR_HOVER>) _throttle_hover, /**< throttle at which vehicle is at hover equilibrium */
(ParamInt<px4::params::MPC_THR_CURVE>) _throttle_curve /**< throttle curve behavior */
(ParamInt<px4::params::MPC_THR_CURVE>) _throttle_curve, /**< throttle curve behavior */
(ParamInt<px4::params::MC_AIRMODE>) _airmode
)
matrix::Vector3f _attitude_p; /**< P gain for attitude control */
......
......@@ -438,7 +438,7 @@ MulticopterAttitudeControl::generate_attitude_setpoint(float dt, bool reset_yaw_
if (reset_yaw_sp) {
_man_yaw_sp = yaw;
} else if (_manual_control_sp.z > 0.05f) {
} else if (_manual_control_sp.z > 0.05f || _airmode.get() == (int32_t)Mixer::Airmode::roll_pitch_yaw) {
const float yaw_rate = math::radians(_yaw_rate_scaling.get());
attitude_setpoint.yaw_sp_move_rate = _manual_control_sp.r * yaw_rate;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment