Fix "now" timestamp
Should be taken *after* reading from the serial line, not before.
This commit is contained in:
1 parent
a2527998c2
commit
61e5184377
1 file changed
+3
-1
@@ -1512,11 +1512,13 @@ class MachineCom(object):
|
||||
self.sayHello()
|
||||
|
||||
while self._monitoring_active:
|
||||
now = time.time()
|
||||
try:
|
||||
line = self._readline()
|
||||
if line is None:
|
||||
break
|
||||
|
||||
now = time.time()
|
||||
|
||||
if line.strip() is not "":
|
||||
self._consecutive_timeouts = 0
|
||||
self._timeout = get_new_timeout("communicationBusy" if self._busy_protocol_detected else "communication", self._timeout_intervals)
|
||||
|
||||
Reference in new issue
Block a user