diff --git a/csdr/chain/acarsdec.py b/csdr/chain/acarsdec.py index b62da087..3f514f32 100644 --- a/csdr/chain/acarsdec.py +++ b/csdr/chain/acarsdec.py @@ -1,5 +1,5 @@ from pycsdr.modules import AmDemod -from owrx.acars.acarsdec import AcarsDecModule +from owrx.acars.acarsdec import AcarsDecModule, AcarsParser from csdr.chain.demodulator import ServiceDemodulator from csdr.module import JsonParser @@ -9,8 +9,11 @@ class AcarsDec(ServiceDemodulator): super().__init__([ AmDemod(), AcarsDecModule(), - JsonParser("ACARS"), + AcarsParser(), ]) def getFixedAudioRate(self) -> int: return 12500 + + def supportsSquelch(self) -> bool: + return False diff --git a/owrx/acars/acarsdec.py b/owrx/acars/acarsdec.py index 67e291c4..2428899b 100644 --- a/owrx/acars/acarsdec.py +++ b/owrx/acars/acarsdec.py @@ -1,5 +1,6 @@ from pycsdr.modules import ExecModule from pycsdr.types import Format +from owrx.aeronautical import AcarsProcessor class AcarsDecModule(ExecModule): @@ -9,3 +10,14 @@ class AcarsDecModule(ExecModule): Format.CHAR, ["acarsdec", "-s", "-o", "4"] ) + + +class AcarsParser(AcarsProcessor): + def __init__(self): + super().__init__("ACARS") + + def process(self, line): + msg = super().process(line) + if msg is not None: + if "libacars" in msg: + self.processAcars(msg)