From 4a71c7a2bd9575255219ded0997058b130c189f2 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 10 Jan 2017 12:28:42 -0500 Subject: [PATCH] heater: Report last temperature in PWM debugging Signed-off-by: Kevin O'Connor --- klippy/heater.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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):