mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 09:17:54 -06:00
klippy: Allow any stats producer to determine when stats are needed
Instead of using the toolhead class to determine if stats should be reported, allow every printer object with a stats() callback to determine if stats are needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
08874b9c91
commit
0a5b07f9da
5 changed files with 12 additions and 20 deletions
|
@ -77,7 +77,7 @@ class GCodeParser:
|
|||
self.move_with_transform = transform.move
|
||||
self.position_with_transform = transform.get_position
|
||||
def stats(self, eventtime):
|
||||
return "gcodein=%d" % (self.bytes_read,)
|
||||
return False, "gcodein=%d" % (self.bytes_read,)
|
||||
def printer_state(self, state):
|
||||
if state == 'shutdown':
|
||||
if not self.is_printer_ready:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue