mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +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
|
#else
|
||||||
const float Ki = pidCoefficient[axis].Ki;
|
const float Ki = pidCoefficient[axis].Ki;
|
||||||
#endif
|
#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
|
// -----calculate pidSetpointDelta
|
||||||
float pidSetpointDelta = 0;
|
float pidSetpointDelta = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue