heater: Move Thermistor and Linear to their own files in extras/

Move the Thermistor code to a new thermistor.py module.  Move the
Linear code to a new adc_temperature.py module.  This simplifies the
heater.py code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-04-04 14:53:47 -04:00
parent 0fc4f0946e
commit 06d73207e7
4 changed files with 154 additions and 124 deletions

View file

@ -59,7 +59,7 @@ class ControlAutoTune:
# Heater control
def set_pwm(self, read_time, value):
if value != self.last_pwm:
self.pwm_samples.append((read_time + heater.PWM_DELAY, value))
self.pwm_samples.append((read_time + self.heater.pwm_delay, value))
self.last_pwm = value
self.heater.set_pwm(read_time, value)
def temperature_callback(self, read_time, temp):