multiplat mc pos ctrl: reset yaw sp with alt sp

This is a work-around until #1741 makes it to the multiplatform version
This commit is contained in:
Thomas Gubler
2015-02-05 21:53:05 +01:00
parent c0f1d841af
commit 69f50bea8c
@@ -245,6 +245,10 @@ MulticopterPositionControl::reset_alt_sp()
_reset_alt_sp = false;
_pos_sp(2) = _pos(2) + (_vel(2) - _params.vel_ff(2) * _sp_move_rate(2)) / _params.pos_p(2);
//XXX hack until #1741 is in/ported
/* reset yaw sp */
_att_sp_msg.data().yaw_body = _att->data().yaw;
//XXX: port this once a mavlink like interface is available
// mavlink_log_info(_mavlink_fd, "[mpc] reset alt sp: %d", -(int)_pos_sp(2));
PX4_INFO("[mpc] reset alt sp: %2.3f", -(double)_pos_sp(2));