diff options
author | jhpadjustable <471580+jhpadjustable@users.noreply.github.com> | 2020-09-28 10:11:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 10:11:05 -0400 |
commit | 48b30e0f5ac7f592797c63d04881aa8483164886 (patch) | |
tree | f5114fc83d0437fab920ee0bd3dd2a6365d9e60e /klippy | |
parent | a8e3afd64aa5db4ea2b846c13be7faf501b20f51 (diff) | |
download | kutter-48b30e0f5ac7f592797c63d04881aa8483164886.tar.gz kutter-48b30e0f5ac7f592797c63d04881aa8483164886.tar.xz kutter-48b30e0f5ac7f592797c63d04881aa8483164886.zip |
display_status: fix M117 checksum trimming (#3377)
The M117 command parser discards the last character of the message
whenever the M117 command does not begin the line and there is no *xx
checksum, e.g.
N0 M117 Look at me
causes the banner area of the printer screen to display "Look at m".
This patch only trims the checksum when one is found to trim.
Signed-Off-By: Jonathan Pickard <jhp@adjustablelabs.info>
Diffstat (limited to 'klippy')
-rw-r--r-- | klippy/extras/display_status.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/extras/display_status.py b/klippy/extras/display_status.py index ce946dc8..05eca0a9 100644 --- a/klippy/extras/display_status.py +++ b/klippy/extras/display_status.py @@ -41,7 +41,9 @@ class DisplayStatus: # Parse out additional info if M117 recd during a print start = umsg.find('M117') end = msg.rfind('*') - msg = msg[start:end] + if end >= 0: + msg = msg[:end] + msg = msg[start:] if len(msg) > 5: self.message = msg[5:] else: |