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:
@@ -747,8 +747,8 @@ class MCU:
|
||||
msg = "%s: mcu_awake=%.03f mcu_task_avg=%.06f mcu_task_stddev=%.06f" % (
|
||||
self._name, self._mcu_tick_awake, self._mcu_tick_avg,
|
||||
self._mcu_tick_stddev)
|
||||
return ' '.join([msg, self._serial.stats(eventtime),
|
||||
self._clocksync.stats(eventtime)])
|
||||
return False, ' '.join([msg, self._serial.stats(eventtime),
|
||||
self._clocksync.stats(eventtime)])
|
||||
def printer_state(self, state):
|
||||
if state == 'connect':
|
||||
self._connect()
|
||||
|
Reference in New Issue
Block a user