mirror of https://github.com/Desuuuu/klipper.git
display: Don't error on an out of range M73 request
No need to report an error if the M73 is not between 0 and 100 - just display the nearest valid value. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
364faf497b
commit
170b9678fb
|
@ -246,7 +246,7 @@ class PrinterLCD:
|
|||
self.msg_time = msg_time
|
||||
# print progress: M73 P<percent>
|
||||
def cmd_M73(self, params):
|
||||
self.progress = self.gcode.get_int('P', params, minval=0, maxval=100)
|
||||
self.progress = min(100., max(0., self.gcode.get_float('P', params)))
|
||||
self.prg_time = M73_TIMEOUT
|
||||
def cmd_M117(self, params):
|
||||
if '#original' in params:
|
||||
|
|
Loading…
Reference in New Issue