From 71f35c8a4d48993da7f18fa8f37040fcc83c7e33 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Tue, 6 Feb 2024 18:35:55 -0500 Subject: [PATCH] Fixing callsign updates in RDS. --- owrx/toolbox.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/owrx/toolbox.py b/owrx/toolbox.py index bf65a6e5..d0e73177 100644 --- a/owrx/toolbox.py +++ b/owrx/toolbox.py @@ -131,8 +131,13 @@ class RdsParser(TextParser): # Expect JSON data in text form data = json.loads(msg) # Delete constantly changing group ID - if "group" in data: - del data["group"] + data.pop("group", None) + # Treat uncertain callsigns as normal + if "callsign_uncertain" in data: + data["callsign"] = data.pop("callsign_uncertain") + # Clear callsign if PI changes + if data.get("pi") != self.rds.get("pi"): + self.rds.pop("callsign", None) # Only update if there is new data if data.items() <= self.rds.items(): return None