AP_PID: compiler warnings: reordered constructor

This commit is contained in:
Tom Pittenger 2015-05-02 02:39:04 -07:00 committed by Andrew Tridgell
parent 0b29848277
commit 54f4d4b07c

View File

@ -56,7 +56,7 @@ float AC_HELI_PID::get_ff(float requested_rate) const
float AC_HELI_PID::get_leaky_i(float leak_rate)
{
if((_ki != 0) && (_dt != 0)){
if(!AP_Math::is_zero(_ki) && !AP_Math::is_zero(_dt)){
_integrator -= (float)_integrator * leak_rate;
_integrator += ((float)_input * _ki) * _dt;
if (_integrator < -_imax) {