mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-21 15:50:20 +01:00
edit template plugin
This commit is contained in:
parent
de80f49aa3
commit
d028df662e
|
|
@ -42,8 +42,6 @@ def throwAlarm(typ,data):
|
|||
logging.debug(i["name"] + " Plugin called")
|
||||
plugin.run(typ,"0",data)
|
||||
|
||||
|
||||
|
||||
# Programm
|
||||
try:
|
||||
|
||||
|
|
@ -80,7 +78,6 @@ try:
|
|||
parser.add_argument("-s", "--squelch", help="Level of Squelch", type=int, default=0)
|
||||
parser.add_argument("-v", "--verbose", help="Shows more Information", action="store_true")
|
||||
parser.add_argument("-q", "--quiet", help="Shows no Information. Only Logfiles", action="store_true")
|
||||
args = []
|
||||
args = parser.parse_args()
|
||||
except:
|
||||
logging.exception("cannot parse args")
|
||||
|
|
@ -348,7 +345,7 @@ try:
|
|||
except KeyboardInterrupt:
|
||||
logging.warning("Keyboard Interrupt")
|
||||
except:
|
||||
logging.exception("")
|
||||
logging.exception("unknown error")
|
||||
finally:
|
||||
try:
|
||||
# rtl_fm.terminate()
|
||||
|
|
|
|||
|
|
@ -6,9 +6,24 @@ import globals # Global variables
|
|||
|
||||
def run(typ,freq,data):
|
||||
try:
|
||||
if typ == "ZVEI":
|
||||
logging.info("ZVEI: %s wurde auf %s empfangen!", data["zvei"],freq)
|
||||
else:
|
||||
logging.warning(typ + " not implemented")
|
||||
logging.debug("read config file")
|
||||
data1 = globals.config.get("template", "data1")
|
||||
data2 = globals.config.get("template", "data2")
|
||||
data3 = globals.config.get("template", "data3")
|
||||
data4 = globals.config.get("template", "data4")
|
||||
logging.debug(" - Data1: %s", data1)
|
||||
logging.debug(" - Data2: %s", data2)
|
||||
logging.debug(" - Data3: %s", data3)
|
||||
logging.debug(" - Data4: %s", data4)
|
||||
|
||||
if typ == "FMS":
|
||||
logging.debug("FMS: %s Status: %s Dir: $s", data["fms"], data["status", data["direction")
|
||||
elif typ == "ZVEI":
|
||||
logging.debug("ZVEI: %s", data["zvei"])
|
||||
elif typ == "POC":
|
||||
logging.debug("POC: %s/%s - %s", data["ric"], data["function"], data["msg"])
|
||||
else
|
||||
logging.warning(typ + " not supportet")
|
||||
|
||||
except:
|
||||
logging.exception("")
|
||||
logging.exception("unknown error")
|
||||
Loading…
Reference in a new issue