mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-13 17:58:05 -06:00
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>
This commit is contained in:
parent
744c6d114e
commit
d03cf2b83f
5 changed files with 20 additions and 10 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue