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 <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-10-01 12:31:31 -04:00
parent f49f298003
commit 820dd0b5e3
1 changed files with 2 additions and 1 deletions

View File

@ -246,7 +246,8 @@ class PrinterLCD:
self.msg_time = msg_time
# print progress: M73 P<percent>
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: