- PID: reverted yi reset on sign(err) change
This commit is contained in:
@@ -36,7 +36,7 @@ class Pid:
|
||||
yp = kp * err
|
||||
|
||||
# Reset yi on error sign changes
|
||||
if yp > self.y_max or yp <= self.y_min or np.sign(err) != np.sign(self.err):
|
||||
if yp > self.y_max or yp <= self.y_min:
|
||||
self.yi = 0
|
||||
|
||||
self.err = err
|
||||
|
||||
Reference in New Issue
Block a user