keep bandpass off per default; sync settings correctly for initial

modulation
This commit is contained in:
Jakob Ketterl 2023-09-03 18:27:05 +02:00
parent aa8922f9a7
commit 33030b38e9
2 changed files with 4 additions and 5 deletions

View file

@ -80,9 +80,9 @@ class Selector(Chain):
self.decimation = Decimator(inputRate, outputRate)
self.bandpass = self._buildBandpass()
self.bandpassCutoffs = None
self.bandpassCutoffs = [None, None]
workers = [self.shift, self.decimation, self.bandpass]
workers = [self.shift, self.decimation]
if withSquelch:
self.readings_per_second = 4
@ -93,8 +93,6 @@ class Selector(Chain):
super().__init__(workers)
self.setBandpass(-4000, 4000)
def _buildBandpass(self) -> Bandpass:
bp_transition = 320.0 / self.outputRate
return Bandpass(transition=bp_transition, use_fft=True)

View file

@ -40,7 +40,6 @@ class ClientDemodulatorChain(Chain):
self.hdOutputRate = hdOutputRate
self.secondaryDspEventReceiver = secondaryDspEventReceiver
self.selector = Selector(sampleRate, outputRate)
self.selector.setBandpass(-4000, 4000)
self.selectorBuffer = Buffer(Format.COMPLEX_FLOAT)
self.audioBuffer = None
self.demodulator = demod
@ -462,6 +461,8 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
if mode.bandpass:
bpf = [mode.bandpass.low_cut, mode.bandpass.high_cut]
self.chain.setBandpass(*bpf)
self.props["low_cut"] = mode.bandpass.low_cut
self.props["high_cut"] = mode.bandpass.high_cut
else:
self.chain.setBandpass(None, None)
else: