Fix "now" timestamp

Should be taken *after* reading from the serial line, not before.
This commit is contained in:
Gina Häußge committed 2018-07-12 14:38:12 +02:00
1 parent a2527998c2
commit 61e5184377
1 file changed
+3 -1
+3 -1
View File
@@ -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)