mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-05 14:25:45 +00:00
some edits
This commit is contained in:
parent
b5b5562a5d
commit
f6094618d8
4 changed files with 7 additions and 4 deletions
|
|
@ -51,7 +51,7 @@ class Fms:
|
|||
tacticalInfo = data[114:117]
|
||||
fms_id = service + country + location + vehicle + status + direction
|
||||
|
||||
if re.search("[0-9a-f]{8}[0-9a-f]{1}[01]{1}", fms_id):
|
||||
if re.search("[0-9a-f]{8}[0-9a-f][01]", fms_id):
|
||||
logging.debug("found valid FMS")
|
||||
|
||||
bwPacket = packet.Packet()
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ class Pocsag:
|
|||
@return BOSWatch POCSAG packet or None"""
|
||||
bitrate, ric, subric = Pocsag._getBitrateRicSubric(data)
|
||||
|
||||
if re.search("[0-9]{7}", ric) and re.search("[1-4]{1}", subric):
|
||||
if re.search("[0-9]{7}", ric) and re.search("[1-4]", subric):
|
||||
if "Alpha:" in data:
|
||||
message = data.split('Alpha: ')[1].strip()
|
||||
message = message.replace('<NUL><NUL>', '').replace('<NUL>', '').replace('<NUL', '').replace('< NUL>', '').replace('<EOT>', '').strip()
|
||||
message = message.replace('<NUL>', '').replace('<NUL', '').replace('< NUL>', '').replace('<EOT>', '').strip()
|
||||
else:
|
||||
message = ""
|
||||
subricText = subric.replace("1", "a").replace("2", "b").replace("3", "c").replace("4", "d")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue