Added config option to invert the polarity of the heater
This commit is contained in:
+8
-2
@@ -146,11 +146,17 @@ class Oven (threading.Thread):
|
||||
if value:
|
||||
self.heat = 1.0
|
||||
if gpio_available:
|
||||
GPIO.output(config.gpio_heat, GPIO.LOW)
|
||||
if config.heater_invert:
|
||||
GPIO.output(config.gpio_heat, GPIO.LOW)
|
||||
else:
|
||||
GPIO.output(config.gpio_heat, GPIO.HIGH)
|
||||
else:
|
||||
self.heat = 0.0
|
||||
if gpio_available:
|
||||
GPIO.output(config.gpio_heat, GPIO.HIGH)
|
||||
if config.heater_invert:
|
||||
GPIO.output(config.gpio_heat, GPIO.HIGH)
|
||||
else:
|
||||
GPIO.output(config.gpio_heat, GPIO.LOW)
|
||||
|
||||
def set_cool(self, value):
|
||||
if value:
|
||||
|
||||
Reference in New Issue
Block a user