merge fix
This commit is contained in:
commit
8f88ecc5c7
@ -32,9 +32,16 @@ currency_type = "$" # Currency Symbol to show when calculating cost to run j
|
||||
|
||||
## Mosfet outputs
|
||||
gpio_heat = 17 # pin 11 Switches zero-cross solid-state-relay
|
||||
gpio_erelay = 27 # pin 13
|
||||
gpio_e_relay = 27 # pin 13
|
||||
gpio_fan = 22 # pin 15
|
||||
|
||||
# Note: `gpio_e_relay` is used to and a redundant mechanical relay in series with
|
||||
# the SSR. Because SSRs normally fail closed (i.e. energized), this provides a
|
||||
# way for the controller to shut off the kiln in the event that the SSR fails.
|
||||
# It is designed to be used with the SSR input connected to the safety relay's
|
||||
# Normally Open (NC) output; thus, the kiln can only heat when the RPi has
|
||||
# energized the safety relay.
|
||||
|
||||
## Display outputs
|
||||
gpio_disp1_clk = 20 # pin 38
|
||||
gpio_disp1_dat = 21 # pin 40
|
||||
|
||||
11
lib/oven.py
11
lib/oven.py
@ -20,6 +20,7 @@ class Output(object):
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setwarnings(False)
|
||||
GPIO.setup(config.gpio_heat, GPIO.OUT)
|
||||
GPIO.setup(config.gpio_e_relay, GPIO.OUT)
|
||||
self.active = True
|
||||
self.GPIO = GPIO
|
||||
except:
|
||||
@ -27,6 +28,14 @@ class Output(object):
|
||||
log.warning(msg)
|
||||
self.active = False
|
||||
|
||||
def safety_off(self):
|
||||
'''Energizes the safety relay'''
|
||||
self.GPIO.output(config.gpio_e_relay, self.GPIO.HIGH)
|
||||
|
||||
def safety_on(self):
|
||||
'''Deenergizes the safety relay'''
|
||||
self.GPIO.output(config.gpio_e_relay, self.GPIO.LOW)
|
||||
|
||||
def heat(self,sleepfor):
|
||||
self.GPIO.output(config.gpio_heat, self.GPIO.HIGH)
|
||||
time.sleep(sleepfor)
|
||||
@ -384,12 +393,14 @@ class RealOven(Oven):
|
||||
|
||||
# call parent init
|
||||
Oven.__init__(self)
|
||||
self.output.safety_off()
|
||||
|
||||
# start thread
|
||||
self.start()
|
||||
|
||||
def reset(self):
|
||||
super().reset()
|
||||
self.output.safety_on()
|
||||
self.output.cool(0)
|
||||
|
||||
def heat_then_cool(self):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user