mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-03 23:30:19 +01:00
Merge branch 'develop' into beta
This commit is contained in:
commit
15aa38238f
|
|
@ -178,7 +178,7 @@ try:
|
|||
demodulation += "-a FMSFSK "
|
||||
logging.debug(" - Demod: FMS")
|
||||
if "ZVEI" in args.demod:
|
||||
demodulation += "-a ZVEI2 "
|
||||
demodulation += "-a ZVEI1 "
|
||||
logging.debug(" - Demod: ZVEI")
|
||||
if "POC512" in args.demod:
|
||||
demodulation += "-a POCSAG512 "
|
||||
|
|
|
|||
|
|
@ -106,15 +106,15 @@ FMS: 43f314170000 (9=Rotkreuz 3=Bayern 1 Ort 0x25=037FZG 7141Stat
|
|||
#
|
||||
|
||||
#with csv description
|
||||
ZVEI2: 12345
|
||||
ZVEI1: 12345
|
||||
#without csv description
|
||||
ZVEI2: 56789
|
||||
ZVEI1: 56789
|
||||
#duplicate
|
||||
ZVEI2: 56789
|
||||
ZVEI1: 56789
|
||||
#with repeat Tone
|
||||
ZVEI2: 1F2F3
|
||||
ZVEI1: 1F2F3
|
||||
#in case of invalid id
|
||||
ZVEI2: 135
|
||||
ZVEI1: 135
|
||||
#in case of a double-tone for siren n-'D's are sended
|
||||
ZVEI2: DDD
|
||||
ZVEI2: DDDDD
|
||||
ZVEI1: DDD
|
||||
ZVEI1: DDDDD
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def decode(freq, decoded):
|
|||
|
||||
# ZVEI Decoder Section
|
||||
# check ZVEI: -> validate -> check double alarm -> log
|
||||
elif "ZVEI2:" in decoded:
|
||||
elif "ZVEI1:" in decoded:
|
||||
logging.debug("received ZVEI")
|
||||
from includes.decoders import zvei
|
||||
zvei.decode(freq, decoded)
|
||||
|
|
|
|||
|
|
@ -17,24 +17,24 @@ from includes import doubleFilter # double alarm filter
|
|||
|
||||
##
|
||||
#
|
||||
# Local function to remove the 'F'
|
||||
# Local function to remove the 'E'
|
||||
#
|
||||
def removeF(zvei):
|
||||
def removeE(zvei):
|
||||
"""
|
||||
Resolve the F from the repeat Tone
|
||||
Resolve the E from the repeat Tone
|
||||
|
||||
@type zvei: string
|
||||
@param zvei: ZVEI Information
|
||||
|
||||
@return: ZVEI without F
|
||||
@return: ZVEI without E
|
||||
@exception: none
|
||||
"""
|
||||
if "F" in zvei:
|
||||
if "E" in zvei:
|
||||
zvei_old = zvei
|
||||
for i in range(1, len(zvei_old)):
|
||||
if zvei[i] == "F":
|
||||
zvei = zvei.replace("F",zvei[i-1],1)
|
||||
logging.debug("resolve F: %s -> %s", zvei_old, zvei)
|
||||
if zvei[i] == "E":
|
||||
zvei = zvei.replace("E",zvei[i-1],1)
|
||||
logging.debug("remove E: %s -> %s", zvei_old, zvei)
|
||||
return zvei
|
||||
|
||||
##
|
||||
|
|
@ -58,7 +58,7 @@ def decode(freq, decoded):
|
|||
"""
|
||||
try:
|
||||
zvei_id = decoded[7:12] # ZVEI Code
|
||||
zvei_id = removeF(zvei_id) # resolve F
|
||||
zvei_id = removeE(zvei_id) # remove E (repeated tone)
|
||||
if re.search("[0-9]{5}", zvei_id): # if ZVEI is valid
|
||||
# check for double alarm
|
||||
if doubleFilter.checkID("ZVEI", zvei_id):
|
||||
|
|
|
|||
Loading…
Reference in a new issue