Skip to content

Commit 9d8bce4

Browse files
committed
simple_pid/PID.py: Fix Travis CI error.
1 parent fa2180d commit 9d8bce4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

simple_pid/PID.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ def __call__(self, input_, dt=None):
100100
elif dt <= 0:
101101
raise ValueError('dt has negative value {}, must be positive'.format(dt))
102102

103-
if (self.sample_time is not None) and (dt < self.sample_time) and (self._last_output is not None):
103+
if (self.sample_time is not None) \
104+
and (dt < self.sample_time) \
105+
and (self._last_output is not None):
104106
# only update every sample_time seconds
105107
return self._last_output
106108

0 commit comments

Comments
 (0)