mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-09 14:55:09 -06:00
heater: Move adc logic into Thermistor class
The Thermistor (and Linear) class should handle all the details of reading the ADC values and converting them to temperatures. So, move that logic out of the Heater() class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
7e78b2665e
commit
0fc4f0946e
2 changed files with 51 additions and 35 deletions
|
@ -62,7 +62,7 @@ class ControlAutoTune:
|
|||
self.pwm_samples.append((read_time + heater.PWM_DELAY, value))
|
||||
self.last_pwm = value
|
||||
self.heater.set_pwm(read_time, value)
|
||||
def adc_callback(self, read_time, temp):
|
||||
def temperature_callback(self, read_time, temp):
|
||||
self.temp_samples.append((read_time, temp))
|
||||
if self.heating and temp >= self.heater.target_temp:
|
||||
self.heating = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue