From 820dd0b5e3d5f9242bcf36b17e9abf6f5b057c78 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 1 Oct 2018 12:31:31 -0400 Subject: [PATCH] display: Don't error if M73 is missing a P parameter Try to avoid raising an error on an M73 command. Signed-off-by: Kevin O'Connor --- klippy/extras/display/display.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/klippy/extras/display/display.py b/klippy/extras/display/display.py index 951007f4..39796d76 100644 --- a/klippy/extras/display/display.py +++ b/klippy/extras/display/display.py @@ -246,7 +246,8 @@ class PrinterLCD: self.msg_time = msg_time # print progress: M73 P def cmd_M73(self, params): - self.progress = min(100., max(0., self.gcode.get_float('P', params))) + self.progress = min(100., max(0., self.gcode.get_float( + 'P', params, 0.))) self.prg_time = M73_TIMEOUT def cmd_M117(self, params): if '#original' in params: