aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-01-10 12:28:42 -0500
committerKevin O'Connor <kevin@koconnor.net>2017-01-10 12:36:51 -0500
commit4a71c7a2bd9575255219ded0997058b130c189f2 (patch)
treeeb022561f9ff4a5373a04401f0aace8ade82d2d0 /klippy/heater.py
parentb2885a53cb54119cf4efee04ff74cc8ffc972db6 (diff)
downloadkutter-4a71c7a2bd9575255219ded0997058b130c189f2.tar.gz
kutter-4a71c7a2bd9575255219ded0997058b130c189f2.tar.xz
kutter-4a71c7a2bd9575255219ded0997058b130c189f2.zip
heater: Report last temperature in PWM debugging
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r--klippy/heater.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index a7522368..0249b75b 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -64,7 +64,9 @@ class PrinterHeater:
pwm_time = read_time + REPORT_TIME + SAMPLE_TIME*SAMPLE_COUNT
self.next_pwm_time = pwm_time + 0.75 * MAX_HEAT_TIME
self.last_pwm_value = value
- logging.debug("pwm=%d@%.3f (%.3f)" % (value, read_time, pwm_time))
+ logging.debug("%s: pwm=%d@%.3f (from %.3f@%.3f)" % (
+ self.config.section, value, pwm_time,
+ self.last_temp, self.last_temp_time))
self.mcu_pwm.set_pwm(pwm_time, value)
# Temperature calculation
def calc_temp(self, adc):