diff --git a/csdr/__init__.py b/csdr/__init__.py index 93c485a..61777f2 100644 --- a/csdr/__init__.py +++ b/csdr/__init__.py @@ -605,7 +605,7 @@ class Dsp(DirewolfConfigSubscriber): self.high_cut = high_cut if self.running: if self.pycsdr_chain is not None and isinstance(self.pycsdr_chain, DemodulatorChain): - self.pycsdr_chain.setBandpass(low_cut, high_cut) + self.pycsdr_chain.setBandpass(float(self.low_cut) / self.if_samp_rate(), float(self.high_cut) / self.if_samp_rate()) else: self.pipes["bpf_pipe"].write( "%g %g\n" % (float(self.low_cut) / self.if_samp_rate(), float(self.high_cut) / self.if_samp_rate()) @@ -724,6 +724,9 @@ class Dsp(DirewolfConfigSubscriber): chain = self.chain(self.demodulator) if self.pycsdr_enabled and isinstance(chain, DemodulatorChain): + self.set_squelch_level(self.squelch_level) + self.set_bpf(self.low_cut, self.high_cut) + self.set_offset_freq(self.offset_freq) chain.setInput(self.buffer) self.output.send_output("audio", chain.getOutput().read) return diff --git a/csdr/chain/demodulator.py b/csdr/chain/demodulator.py index 77c3cff..7286e63 100644 --- a/csdr/chain/demodulator.py +++ b/csdr/chain/demodulator.py @@ -19,7 +19,7 @@ class DemodulatorChain(Chain): self.decimation = FirDecimate(decimation, transition) bp_transition = 320.0 / if_samp_rate - self.bandpass = Bandpass(bp_transition, use_fft=True) + self.bandpass = Bandpass(transition=bp_transition, use_fft=True) self.squelch = Squelch(5)