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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user