resend_request_communication_errors was too narrow

Didn't match Marlin's "checksum mismatch", only Repetier's "checksum
error". Since the error handler checks against
recoverable_communication_errors before
resend_request_communication_errors, we can just switch back to the more
broader check against "checksum" for the latter.

We could also have added an explicit check for "checksum mismatch"
instead but since we used to check for "checksum" and we don't know what
other varieties for this specific error might be out there in the
thousands of firmware variants (who needs consistency when they can
have a free for all?), we'll err on the side of caution instead.

Fixes #2262
This commit is contained in:
Gina Häußge 2017-12-04 11:09:22 +01:00
parent f72dfb48e1
commit 263925625b

View file

@ -1953,18 +1953,19 @@ class MachineCom(object):
return False
_resend_request_communication_errors = ("line number",
"wrong checksum",
"missing checksum",
"format error",
"expected line")
_recoverable_communication_errors = ("no line number with checksum",)
_sd_card_errors = ("volume.init",
"openroot",
"workdir",
"error writing to file",
"cannot open",
"cannot enter")
_recoverable_communication_errors = ("no line number with checksum",)
_resend_request_communication_errors = ("line number", # since this error class get's checked after recoverable
# communication errors, we can use this broad term here
"checksum", # since this error class get's checked after recoverable
# communication errors, we can use this broad term here
"format error",
"expected line")
_sd_card_errors = ("volume.init",
"openroot",
"workdir",
"error writing to file",
"cannot open",
"cannot enter")
def _handle_errors(self, line):
if line is None:
return