attitude_fw: move angular rate limits to body angular rates (#404)

This commit is contained in:
Thomas Stastny
2018-03-08 22:19:19 -05:00
committed by Daniel Agar
parent 78e983073a
commit 041886a289
6 changed files with 18 additions and 27 deletions
+5
View File
@@ -104,6 +104,11 @@ void ECL_Controller::set_max_rate(float max_rate)
_max_rate = max_rate;
}
void ECL_Controller::set_bodyrate_setpoint(float rate)
{
_bodyrate_setpoint = math::constrain(rate, -_max_rate, _max_rate);
}
float ECL_Controller::get_rate_error()
{
return _rate_error;