mirror of https://github.com/Desuuuu/klipper.git
display_status: stops M73 from setting progress to 0 if P missing
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
parent
fe2974b8ec
commit
38b992532a
|
@ -8,6 +8,8 @@ All dates in this document are approximate.
|
|||
|
||||
## Changes
|
||||
|
||||
20220307: `M73` will no longer set print progress to 0 if `P` is missing.
|
||||
|
||||
20220304: There is no longer a default for the `extruder` parameter of
|
||||
[extruder_stepper](Config_Reference.md#extruder_stepper) config
|
||||
sections. If desired, specify `extruder: extruder` explicitly to
|
||||
|
|
|
@ -30,10 +30,12 @@ class DisplayStatus:
|
|||
progress = sdcard.get_status(eventtime)['progress']
|
||||
return { 'progress': progress, 'message': self.message }
|
||||
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
|
||||
progress = gcmd.get_float('P', None)
|
||||
if progress is not None:
|
||||
progress = progress / 100.
|
||||
self.progress = min(1., max(0., progress))
|
||||
curtime = self.printer.get_reactor().monotonic()
|
||||
self.expire_progress = curtime + M73_TIMEOUT
|
||||
def cmd_M117(self, gcmd):
|
||||
msg = gcmd.get_raw_command_parameters() or None
|
||||
self.message = msg
|
||||
|
|
Loading…
Reference in New Issue