diff --git a/csdr/chain/digimodes.py b/csdr/chain/digimodes.py index 3965cc26..b5d69bf1 100644 --- a/csdr/chain/digimodes.py +++ b/csdr/chain/digimodes.py @@ -112,12 +112,10 @@ class CwDemodulator(SecondaryDemodulator, SecondarySelectorChain): class RttyDemodulator(SecondaryDemodulator, SecondarySelectorChain): - def __init__(self, baudRate: float): - # Our input "baud rate" is actually frequency shift here - # Real RTTY baud rate is different + def __init__(self, targetWidth: float, baudRate: float): self.sampleRate = 12000 - self.targetWidth = baudRate - self.baudRate = 45.45 + self.targetWidth = targetWidth + self.baudRate = baudRate workers = [ Agc(Format.FLOAT), RttyDecoder(self.sampleRate, 0, int(self.targetWidth), self.baudRate), diff --git a/owrx/dsp.py b/owrx/dsp.py index d54d8ca4..e30e9737 100644 --- a/owrx/dsp.py +++ b/owrx/dsp.py @@ -616,9 +616,12 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient) elif mod == "cwdecoder": from csdr.chain.digimodes import CwDemodulator return CwDemodulator(75.0) - elif mod == "rtty": + elif mod == "rtty170": from csdr.chain.digimodes import RttyDemodulator - return RttyDemodulator(170.0) + return RttyDemodulator(170.0, 45.45) + elif mod == "rtty450": + from csdr.chain.digimodes import RttyDemodulator + return RttyDemodulator(450.0, 50.0) def setSecondaryDemodulator(self, mod): demodulator = self._getSecondaryDemodulator(mod) diff --git a/owrx/modes.py b/owrx/modes.py index 38c08f0f..6e1ae8e1 100644 --- a/owrx/modes.py +++ b/owrx/modes.py @@ -139,7 +139,8 @@ class Modes(object): squelch=False, ), DigitalMode("cwdecoder", "CWDecoder", underlying=["usb"]), - DigitalMode("rtty", "RTTY", underlying=["usb"]), + DigitalMode("rtty170", "RTTY170", underlying=["usb"]), + DigitalMode("rtty450", "RTTY450", underlying=["usb"]), ] @staticmethod