mc_att_control: yaw feed-forward in manual control modes fixed

This commit is contained in:
Anton Babushkin 2014-04-29 19:51:05 +02:00
parent 2ee02e5e4b
commit 0c58588a87
1 changed files with 2 additions and 1 deletions

View File

@ -496,7 +496,8 @@ MulticopterAttitudeControl::control_attitude(float dt)
//}
} else {
/* move yaw setpoint */
_v_att_sp.yaw_body = _wrap_pi(_v_att_sp.yaw_body + _manual_control_sp.yaw * _params.man_yaw_max * dt);
yaw_sp_move_rate = _manual_control_sp.yaw * _params.man_yaw_max;
_v_att_sp.yaw_body = _wrap_pi(_v_att_sp.yaw_body + yaw_sp_move_rate * dt);
_v_att_sp.R_valid = false;
publish_att_sp = true;
}