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:
parent
b1129332c9
commit
8092ff7e62
1 changed files with 4 additions and 0 deletions
|
|
@ -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() != '' \
|
||||
|
|
|
|||
Loading…
Reference in a new issue