From 6222463a96b4ba6dd03f15e2a157bb3fbf8ccb8f Mon Sep 17 00:00:00 2001 From: mrduckspace <34840030+mrduckspace@users.noreply.github.com> Date: Fri, 27 Mar 2020 09:38:33 +0100 Subject: [PATCH] Update gpiocontrol.py --- plugins/gpiocontrol/gpiocontrol.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/plugins/gpiocontrol/gpiocontrol.py b/plugins/gpiocontrol/gpiocontrol.py index c75f072..7662fe8 100644 --- a/plugins/gpiocontrol/gpiocontrol.py +++ b/plugins/gpiocontrol/gpiocontrol.py @@ -83,19 +83,23 @@ def run(typ,freq,data): ########## User Plugin CODE ########## if typ == "FMS": - #th = threading.Thread(target = trigger) - #th.start() - logging.warning("%s not supported", typ) + th = threading.Thread(target = trigger) + th.start() + #logging.warning("%s not supported", typ) elif typ == "ZVEI": - #th = threading.Thread(target = trigger) - #th.start() - logging.warning("%s not supported", typ) + th = threading.Thread(target = trigger) + th.start() + #logging.warning("%s not supported", typ) elif typ == "POC": - if data["ric"] in globalVars.config.get("gpiocontrol", "activerics"): - th = threading.Thread(target = trigger) - th.start() - else: - logging.info("Ric not in activerics") + if globalVars.config.get("gpiocontrol", "activerics") == "": + th = threading.Thread(target = trigger) + th.start() + else + if data["ric"] in globalVars.config.get("gpiocontrol", "activerics"): + th = threading.Thread(target = trigger) + th.start() + else: + logging.info("Ric not in activerics") else: logging.warning("Invalid Typ: %s", typ) ########## User Plugin CODE ##########