gcode_macro: Add "rawparams" pseudo-variable

Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
Pedro Lamas
2021-10-22 18:24:16 +01:00
committed by KevinOConnor
parent a5ec751406
commit 7ef7bf608a
5 changed files with 34 additions and 24 deletions

View File

@@ -35,19 +35,8 @@ class DisplayStatus:
curtime = self.printer.get_reactor().monotonic()
self.expire_progress = curtime + M73_TIMEOUT
def cmd_M117(self, gcmd):
msg = gcmd.get_commandline()
umsg = msg.upper()
if not umsg.startswith('M117'):
# Parse out additional info if M117 recd during a print
start = umsg.find('M117')
end = msg.rfind('*')
if end >= 0:
msg = msg[:end]
msg = msg[start:]
if len(msg) > 5:
self.message = msg[5:]
else:
self.message = None
msg = gcmd.get_raw_command_parameters() or None
self.message = msg
def load_config(config):
return DisplayStatus(config)