remove negative windup
This commit is contained in:
parent
17c021a2a4
commit
0609877f9e
1 changed files with 1 additions and 1 deletions
|
|
@ -391,7 +391,7 @@ uint16_t pid(int16_t delta, int16_t max_duty)
|
|||
|
||||
// TODO: use a back calculation anti windup strategy
|
||||
// only integrate if the output is less then max
|
||||
if (e < i2fp(100)) {
|
||||
if (e < i2fp(100) && e > 0) {
|
||||
intgrt = fp_add(intgrt, err_i);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue