kopia lustrzana https://github.com/botheredbybees/kilnController
Merge pull request #16 from openelectron/add_heater_invert
Added config option to invert the polarity of the heaterpull/1/head
commit
8930e5700e
|
@ -26,6 +26,8 @@ gpio_heat = 11 # Switches zero-cross solid-state-relay
|
|||
gpio_cool = 10 # Regulates PWM for 12V DC Blower
|
||||
gpio_air = 9 # Switches 0-phase det. solid-state-relay
|
||||
|
||||
heater_invert = 0 # switches the polarity of the heater control
|
||||
|
||||
### Inputs
|
||||
gpio_door = 18
|
||||
|
||||
|
|
10
lib/oven.py
10
lib/oven.py
|
@ -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:
|
||||
|
|
Ładowanie…
Reference in New Issue