From 5a0b9d1ce80f9b05f71d974a461a8e982dd8b0a6 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 24 Apr 2020 19:34:51 -0400 Subject: [PATCH] display_status: Use new GCodeCommand wrappers Signed-off-by: Kevin O'Connor --- klippy/extras/display_status.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/klippy/extras/display_status.py b/klippy/extras/display_status.py index ce2cece5..ce946dc8 100644 --- a/klippy/extras/display_status.py +++ b/klippy/extras/display_status.py @@ -29,14 +29,13 @@ class DisplayStatus: if sdcard is not None: progress = sdcard.get_status(eventtime)['progress'] return { 'progress': progress, 'message': self.message } - def cmd_M73(self, params): - gcode = self.printer.lookup_object('gcode') - progress = gcode.get_float('P', params, 0.) / 100. + def cmd_M73(self, gcmd): + progress = gcmd.get_float('P', 0.) / 100. self.progress = min(1., max(0., progress)) curtime = self.printer.get_reactor().monotonic() self.expire_progress = curtime + M73_TIMEOUT - def cmd_M117(self, params): - msg = params['#original'] + 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