mc_att_control: poll vehicle_rates_setpoint if attitude controller disabled

This commit is contained in:
Anton Babushkin 2014-02-17 23:58:13 +04:00
parent 55f5f1815f
commit 2b4af66357
1 changed files with 6 additions and 4 deletions

View File

@ -761,10 +761,12 @@ MulticopterAttitudeControl::task_main()
}
} else {
/* attitude controller disabled */
// TODO poll 'attitude_rates_setpoint' topic
_rates_sp.zero();
_thrust_sp = 0.0f;
/* attitude controller disabled, poll rates setpoint topic */
vehicle_rates_setpoint_poll();
_rates_sp(0) = _v_rates_sp.roll;
_rates_sp(1) = _v_rates_sp.pitch;
_rates_sp(2) = _v_rates_sp.yaw;
_thrust_sp = _v_rates_sp.thrust;
}
if (_v_control_mode.flag_control_rates_enabled) {