From 933f93ce1dc7858ec0188736f332ddd2ea82cf34 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Fri, 22 Sep 2023 00:12:24 +0200 Subject: [PATCH] don't double up ACARS in the mode --- owrx/aeronautical.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/owrx/aeronautical.py b/owrx/aeronautical.py index fe2b0705..defdbb64 100644 --- a/owrx/aeronautical.py +++ b/owrx/aeronautical.py @@ -86,8 +86,13 @@ class AcarsProcessor(JsonParser, metaclass=ABCMeta): else: source = FlightSource(flight_id) Map.getSharedInstance().updateLocation( - source, AirplaneLocation(msg), "ACARS over {}".format(self.mode) + source, AirplaneLocation(msg), self.getMode() ) + def getMode(self): + if self.mode == "ACARS": + return self.mode + return "ACARS over {}".format(self.mode) + def processFlight(self, raw): return self.flightRegex.sub(r"\g<1>\g<2>", raw)