aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display_status.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-04-24 19:34:51 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-05-05 11:08:11 -0400
commit5a0b9d1ce80f9b05f71d974a461a8e982dd8b0a6 (patch)
tree3a7084a8038853013728bf8ee3f71edf40be2f9f /klippy/extras/display_status.py
parent98c9a991a3062a743fc900dc601514840127d600 (diff)
downloadkutter-5a0b9d1ce80f9b05f71d974a461a8e982dd8b0a6.tar.gz
kutter-5a0b9d1ce80f9b05f71d974a461a8e982dd8b0a6.tar.xz
kutter-5a0b9d1ce80f9b05f71d974a461a8e982dd8b0a6.zip
display_status: Use new GCodeCommand wrappers
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/extras/display_status.py')
-rw-r--r--klippy/extras/display_status.py9
1 files 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