mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 19:40:31 +03:00
simplify iterm calculation
This commit is contained in:
parent
31d08f1515
commit
dd81e49b75
1 changed files with 1 additions and 1 deletions
|
@ -1422,7 +1422,7 @@ void FAST_CODE pidController(const pidProfile_t *pidProfile, timeUs_t currentTim
|
|||
#else
|
||||
const float Ki = pidCoefficient[axis].Ki;
|
||||
#endif
|
||||
pidData[axis].I = constrainf(previousIterm + Ki * itermErrorRate * dynCi + agGain * itermErrorRate, -itermLimit, itermLimit);
|
||||
pidData[axis].I = constrainf(previousIterm + (Ki * dynCi + agGain) * itermErrorRate, -itermLimit, itermLimit);
|
||||
|
||||
// -----calculate pidSetpointDelta
|
||||
float pidSetpointDelta = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue