Compare commits
1 Commits
85b14a73ed
...
a43c556341
Author | SHA1 | Date | |
---|---|---|---|
|
a43c556341 |
@ -1,5 +1,4 @@
|
|||||||
import os
|
import os
|
||||||
import site
|
|
||||||
import json
|
import json
|
||||||
import datetime
|
import datetime
|
||||||
import logging
|
import logging
|
||||||
@ -20,8 +19,7 @@ heat_pin = 26
|
|||||||
|
|
||||||
heat_state = False
|
heat_state = False
|
||||||
|
|
||||||
PACKAGE_PATH = site.getsitepackages()[0]
|
CONFIG_FILE = "greenhouse/config/greenhouse.json"
|
||||||
CONFIG_FILE = os.path.join(PACKAGE_PATH, "greenhouse/config/greenhouse.json")
|
|
||||||
|
|
||||||
GPIO.setwarnings(False)
|
GPIO.setwarnings(False)
|
||||||
GPIO.setmode(GPIO.BCM)
|
GPIO.setmode(GPIO.BCM)
|
||||||
@ -97,6 +95,8 @@ class GreenControl(Thread):
|
|||||||
while self.__run_condition:
|
while self.__run_condition:
|
||||||
if self.__trigger_read_config:
|
if self.__trigger_read_config:
|
||||||
self.__trigger_read_config = False
|
self.__trigger_read_config = False
|
||||||
|
log.info(os.getcwd())
|
||||||
|
sleep(5)
|
||||||
with open(self.cfg_file, "r") as f:
|
with open(self.cfg_file, "r") as f:
|
||||||
self.config = json.load(f)
|
self.config = json.load(f)
|
||||||
now = datetime.datetime.now()
|
now = datetime.datetime.now()
|
||||||
|
Loading…
Reference in New Issue
Block a user