From e2383581cc15ca351c2fcf383252c14f28ad3fe6 Mon Sep 17 00:00:00 2001 From: Jonathan Challinger Date: Thu, 26 Feb 2015 15:52:04 -0800 Subject: [PATCH] AC_AttitudeControl: relax_bf_rate_controller resets rate integrators --- libraries/AC_AttitudeControl/AC_AttitudeControl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp b/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp index b4707f0356..6446e43fa8 100644 --- a/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp +++ b/libraries/AC_AttitudeControl/AC_AttitudeControl.cpp @@ -95,6 +95,10 @@ void AC_AttitudeControl::relax_bf_rate_controller() // ensure zero error in body frame rate controllers const Vector3f& gyro = _ahrs.get_gyro(); _rate_bf_target = gyro * AC_ATTITUDE_CONTROL_DEGX100; + + _pid_rate_roll.reset_I(); + _pid_rate_pitch.reset_I(); + _pid_rate_yaw.reset_I(); } //