aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-10-11 22:16:02 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-10-12 11:59:27 -0400
commitd03cf2b83f9df6b802af72860d8d3b56df89956f (patch)
treeb9f61292f67fcf0548eaa8f5b3a7c491290689fd /klippy/heater.py
parent744c6d114e3681a2e8cfcd4475424a7d19774d52 (diff)
downloadkutter-d03cf2b83f9df6b802af72860d8d3b56df89956f.tar.gz
kutter-d03cf2b83f9df6b802af72860d8d3b56df89956f.tar.xz
kutter-d03cf2b83f9df6b802af72860d8d3b56df89956f.zip
adccmds: Continue to query analog inputs after a shutdown
Continue to sample the ADC input pins even if the MCU goes into a shutdown state. This enables the printer to continue reporting temperatures even on an mcu error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r--klippy/heater.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/klippy/heater.py b/klippy/heater.py
index 7acd38b1..445f868b 100644
--- a/klippy/heater.py
+++ b/klippy/heater.py
@@ -167,8 +167,11 @@ class PrinterHeater:
% (degrees, self.min_temp, self.max_temp))
with self.lock:
self.target_temp = degrees
- def get_temp(self):
+ def get_temp(self, eventtime):
+ print_time = self.mcu_adc.get_mcu().estimated_print_time(eventtime) - 5.
with self.lock:
+ if self.last_temp_time < print_time:
+ return 0., self.target_temp
return self.last_temp, self.target_temp
def check_busy(self, eventtime):
with self.lock: