attempt to include m17-demod (untested due to lack of signals)
This commit is contained in:
parent
2579b9be26
commit
017bbc3748
11
csdr/csdr.py
11
csdr/csdr.py
@ -217,6 +217,15 @@ class dsp(object):
|
||||
"CSDR_FIXED_BUFSIZE=32 csdr agc_s16 --max 30 --initial 3",
|
||||
"sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - ",
|
||||
]
|
||||
# m17
|
||||
elif which == "m17":
|
||||
chain += [
|
||||
"csdr limit_ff",
|
||||
"csdr convert_f_s16",
|
||||
"m17-demod",
|
||||
"CSDR_FIXED_BUFSIZE=32 csdr agc_s16 --max 30 --initial 3",
|
||||
"sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - ",
|
||||
]
|
||||
# digiham modes
|
||||
else:
|
||||
chain += ["rrc_filter", "gfsk_demodulator"]
|
||||
@ -561,7 +570,7 @@ class dsp(object):
|
||||
def isDigitalVoice(self, demodulator=None):
|
||||
if demodulator is None:
|
||||
demodulator = self.get_demodulator()
|
||||
return demodulator in ["dmr", "dstar", "nxdn", "ysf"]
|
||||
return demodulator in ["dmr", "dstar", "nxdn", "ysf", "m17"]
|
||||
|
||||
def isWsjtMode(self, demodulator=None):
|
||||
if demodulator is None:
|
||||
|
@ -73,6 +73,7 @@ class FeatureDetector(object):
|
||||
"digital_voice_digiham": ["digiham", "sox"],
|
||||
"digital_voice_dsd": ["dsd", "sox", "digiham"],
|
||||
"digital_voice_freedv": ["freedv_rx", "sox"],
|
||||
"digital_voice_m17": ["m17_demod", "sox"],
|
||||
"wsjt-x": ["wsjtx", "sox"],
|
||||
"packet": ["direwolf", "sox"],
|
||||
"pocsag": ["digiham", "sox"],
|
||||
@ -148,7 +149,7 @@ class FeatureDetector(object):
|
||||
# prevent X11 programs from opening windows if called from a GUI shell
|
||||
env.pop("DISPLAY", None)
|
||||
try:
|
||||
process = subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=tmp_dir, env=env)
|
||||
process = subprocess.Popen(cmd, stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=tmp_dir, env=env)
|
||||
rc = process.wait()
|
||||
if expected_result is None:
|
||||
return rc != 32512
|
||||
@ -417,6 +418,10 @@ class FeatureDetector(object):
|
||||
"""
|
||||
return self.command_is_runnable("dsd")
|
||||
|
||||
def has_m17_demod(self):
|
||||
# TODO: documentation
|
||||
return self.command_is_runnable("m17-demod")
|
||||
|
||||
def has_sox(self):
|
||||
"""
|
||||
The sox audio library is used to convert between the typical 8 kHz audio sampling rate used by digital modes and
|
||||
|
@ -49,6 +49,7 @@ class Modes(object):
|
||||
AnalogMode("dstar", "D-Star", bandpass=Bandpass(-3250, 3250), requirements=["digital_voice_dsd"], squelch=False),
|
||||
AnalogMode("nxdn", "NXDN", bandpass=Bandpass(-3250, 3250), requirements=["digital_voice_dsd"], squelch=False),
|
||||
AnalogMode("ysf", "YSF", bandpass=Bandpass(-4000, 4000), requirements=["digital_voice_digiham"], squelch=False),
|
||||
AnalogMode("m17", "M17", bandpass=Bandpass(-4000, 4000), requirements=["digital_voice_m17"], squelch=False),
|
||||
AnalogMode("freedv", "FreeDV", bandpass=Bandpass(300, 3000), requirements=["digital_voice_freedv"], squelch=False),
|
||||
AnalogMode("drm", "DRM", bandpass=Bandpass(-5000, 5000), requirements=["drm"], squelch=False),
|
||||
DigitalMode("bpsk31", "BPSK31", underlying=["usb"]),
|
||||
|
Loading…
Reference in New Issue
Block a user