Workaround a bug in old versions of Marlin

For some versions, the ok for a file delete message is not prepended
by a newline: "File Deleted:<filename>ok"

This work around will make it still detectable.
This commit is contained in:
Gina Häußge 2015-03-04 20:35:10 +01:00
parent b1129332c9
commit 8092ff7e62

View file

@ -953,6 +953,10 @@ class MachineCom(object):
pass
elif 'Done saving file' in line:
self.refreshSdFiles()
elif 'File deleted' in line and line.strip().endswith("ok"):
# buggy Marlin version that doesn't send a proper \r after the "File deleted" statement, fixed in
# current versions
self._clear_to_send.set()
##~~ Message handling
elif line.strip() != '' \