more work on the empty mode

This commit is contained in:
Jakob Ketterl 2023-08-24 19:04:30 +02:00
parent f7bb1427cc
commit 3d73a0c41f
2 changed files with 9 additions and 3 deletions

View file

@ -554,7 +554,7 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
elif demod == "freedv":
from csdr.chain.freedv import FreeDV
return FreeDV()
elif demod == "none":
elif demod == "empty":
from csdr.chain.analog import Empty
return Empty()

View file

@ -33,6 +33,9 @@ class Mode:
return self.modulation
EmptyMode = Mode("empty", "Empty")
class AnalogMode(Mode):
pass
@ -45,7 +48,10 @@ class DigitalMode(Mode):
self.underlying = underlying
def get_underlying_mode(self):
return Modes.findByModulation(self.underlying[0])
mode = Modes.findByModulation(self.underlying[0])
if mode is None:
mode = EmptyMode
return mode
def get_bandpass(self):
if self.bandpass is not None:
@ -152,7 +158,7 @@ class Modes(object):
DigitalMode(
"adsb",
"ADS-B",
underlying=["none"],
underlying=["empty"],
bandpass=Bandpass(-1e6, 1e6),
requirements=["dump1090"],
squelch=False,