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:
Kevin O'Connor 2018-02-05 13:52:05 -05:00
parent 08874b9c91
commit 0a5b07f9da
5 changed files with 12 additions and 20 deletions

View file

@ -194,7 +194,7 @@ class PrinterHeater:
target_temp = self.target_temp
last_temp = self.last_temp
last_pwm_value = self.last_pwm_value
return '%s: target=%.0f temp=%.0f pwm=%.3f' % (
return False, '%s: target=%.0f temp=%.0f pwm=%.3f' % (
self.name, target_temp, last_temp, last_pwm_value)