MAVLink/Commander: @Pedro-Roque's offboard yawrate handling

This commit is contained in:
Matthias Grob
2019-06-04 08:26:09 +02:00
committed by Julian Oes
parent 579cbbb42c
commit ac002db25c
5 changed files with 59 additions and 11 deletions
@@ -837,6 +837,14 @@ MulticopterAttitudeControl::run()
}
control_attitude();
if (_v_control_mode.flag_control_yawrate_override_enabled)
{
/* Yaw rate override enabled, overwrite the yaw setpoint */
vehicle_rates_setpoint_poll();
const auto yawrate_reference = _v_rates_sp.yaw;
_rates_sp(2) = yawrate_reference;
}
publish_rates_setpoint();
}