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.decimation = Decimator(inputRate, outputRate)
self.bandpass = self._buildBandpass() 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: if withSquelch:
self.readings_per_second = 4 self.readings_per_second = 4
@ -93,8 +93,6 @@ class Selector(Chain):
super().__init__(workers) super().__init__(workers)
self.setBandpass(-4000, 4000)
def _buildBandpass(self) -> Bandpass: def _buildBandpass(self) -> Bandpass:
bp_transition = 320.0 / self.outputRate bp_transition = 320.0 / self.outputRate
return Bandpass(transition=bp_transition, use_fft=True) return Bandpass(transition=bp_transition, use_fft=True)

View File

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