diff --git a/boswatch.py b/boswatch.py index 6b644f5..e8b7b3a 100755 --- a/boswatch.py +++ b/boswatch.py @@ -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 " diff --git a/citest/testdata.txt b/citest/testdata.txt index 58e5a5e..e4ac22e 100644 --- a/citest/testdata.txt +++ b/citest/testdata.txt @@ -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 diff --git a/includes/decoder.py b/includes/decoder.py index 26c8ba4..9c979d3 100644 --- a/includes/decoder.py +++ b/includes/decoder.py @@ -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) diff --git a/includes/decoders/zvei.py b/includes/decoders/zvei.py index ac747da..cabe68c 100644 --- a/includes/decoders/zvei.py +++ b/includes/decoders/zvei.py @@ -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):