Add more missing humidifier2 stuff
This commit is contained in:
parent
bd63e4e0fc
commit
8dae2ce83c
|
@ -232,12 +232,12 @@ class Controller:
|
||||||
if comp_humidity < self.target_lower:
|
if comp_humidity < self.target_lower:
|
||||||
if humidifier.off:
|
if humidifier.off:
|
||||||
humidifier.toggle(s)
|
humidifier.toggle(s)
|
||||||
if humidifer2.off:
|
if humidifier2.off:
|
||||||
humidifier2.toggle(s)
|
humidifier2.toggle(s)
|
||||||
elif comp_humidity > self.target_upper:
|
elif comp_humidity > self.target_upper:
|
||||||
if humidifier.on:
|
if humidifier.on:
|
||||||
humidifier.toggle(s)
|
humidifier.toggle(s)
|
||||||
if humidifer2.on:
|
if humidifier2.on:
|
||||||
humidifier2.toggle(s)
|
humidifier2.toggle(s)
|
||||||
|
|
||||||
humidifier = Humidifier()
|
humidifier = Humidifier()
|
||||||
|
@ -247,7 +247,7 @@ controller = Controller()
|
||||||
exiting = False
|
exiting = False
|
||||||
# run thread to process data from process's stdout
|
# run thread to process data from process's stdout
|
||||||
def stdout_loop():
|
def stdout_loop():
|
||||||
global process, controller, humidifier
|
global process, controller, humidifier, humidifier2
|
||||||
while not exiting:
|
while not exiting:
|
||||||
msg = process.stdout.readline()
|
msg = process.stdout.readline()
|
||||||
if len(msg) <= 1:
|
if len(msg) <= 1:
|
||||||
|
@ -293,6 +293,12 @@ def stdout_loop():
|
||||||
humidifier.on_threshold = value
|
humidifier.on_threshold = value
|
||||||
elif name == "toggle_cooldown":
|
elif name == "toggle_cooldown":
|
||||||
humidifier.toggle_cooldown = value
|
humidifier.toggle_cooldown = value
|
||||||
|
elif name == "off_threshold_volts2":
|
||||||
|
humidifier2.off_threshold = value
|
||||||
|
elif name == "on_threshold_volts2":
|
||||||
|
humidifier2.on_threshold = value
|
||||||
|
elif name == "toggle_cooldown2":
|
||||||
|
humidifier2.toggle_cooldown = value
|
||||||
elif "manual_mode" in msg_js:
|
elif "manual_mode" in msg_js:
|
||||||
controller.manual_mode = msg_js["manual_mode"]
|
controller.manual_mode = msg_js["manual_mode"]
|
||||||
if controller.manual_mode:
|
if controller.manual_mode:
|
||||||
|
|
Loading…
Reference in New Issue