Commit e5e6349a authored by Guillaume Seguin's avatar Guillaume Seguin

Fix wrong indent and rework some logic (#401)

parent f57eb1d4
......@@ -227,9 +227,10 @@ class printcore():
# meaning no data was received thus we count those empty lines,
# and once we have seen 5 in a row, we just break and send a
# new M105
if not line: empty_lines += 1
else: empty_lines = 0
if not line:
empty_lines += 1
if empty_lines == 5: break
else: empty_lines = 0
if line.startswith(tuple(self.greetings)) or line.startswith('ok') or "T:" in line:
if self.onlinecb:
try: self.onlinecb()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment