From 5dee66fee9c7c44b5b5b218098f328b5c69a01f5 Mon Sep 17 00:00:00 2001 From: borisbstyle Date: Sat, 9 May 2015 02:08:52 +0200 Subject: [PATCH] More commented --- src/main/flight/pid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/flight/pid.c b/src/main/flight/pid.c index 9df3f94250..2170cf5ee2 100644 --- a/src/main/flight/pid.c +++ b/src/main/flight/pid.c @@ -184,7 +184,7 @@ static void pidLuxFloat(pidProfile_t *pidProfile, controlRateConfig_t *controlRa // -----calculate P component PTerm = RateError * pidProfile->P_f[axis] * PIDscaler[axis] / 100; - // -----calculate I component + // -----calculate I component. Note that PIDscaler is divided by 1000, because it is simplified formule from the previous multiply by 10 errorGyroIf[axis] = constrainf(errorGyroIf[axis] + RateError * dT * pidProfile->I_f[axis] * PIDscaler[axis] / 1000, -250.0f, 250.0f); // limit maximum integrator value to prevent WindUp - accumulating extreme values when system is saturated.