Adding separate 170Hz (HAM) and 450Hz (DDK) RTTY modes.

This commit is contained in:
Marat Fayzullin 2023-01-29 23:14:47 -05:00
parent bc7074f099
commit 8662f47d4d
3 changed files with 10 additions and 8 deletions

View File

@ -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),

View File

@ -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)

View File

@ -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