gcode_macro: Add "rawparams" pseudo-variable
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
committed by
KevinOConnor
parent
a5ec751406
commit
7ef7bf608a
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user