From 83bf6efb1de0bff5b1d8b7c2d0142080864b312f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sat, 5 Jan 2013 00:00:38 +0100 Subject: [PATCH] Ignore "No Checksum with line number" errors as they trigger a resend just as well as e.g. "No Line Number with checksum" (quick check of the Marlin source seems to confirm this). Should hopefully help with #5 and #9 -- will not reduce the communication errors (that's most probably not the comm stacks fault but rather a noise issue or something) but will lead to a more error resilient behaviour. Please test (I can't reproduce the issue(s)). --- printer_webui/util/comm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/printer_webui/util/comm.py b/printer_webui/util/comm.py index 6308b67..80f5d2d 100644 --- a/printer_webui/util/comm.py +++ b/printer_webui/util/comm.py @@ -328,7 +328,7 @@ class MachineCom(object): if re.match('Error:[0-9]\n', line): line = line.rstrip() + self._readline() #Skip the communication errors, as those get corrected. - if 'checksum mismatch' in line or 'Line Number is not Last Line Number' in line or 'No Line Number with checksum' in line: + if 'checksum mismatch' in line or 'Line Number is not Last Line Number' in line or 'No Line Number with checksum' in line or 'No Checksum with line number' in line: pass elif not self.isError(): self._errorValue = line[6:]