mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-14 10:17:56 -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
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue