diff --git a/python/radio.py b/python/radio.py index 0268b33..8f50533 100644 --- a/python/radio.py +++ b/python/radio.py @@ -141,7 +141,12 @@ class modes_radio (gr.top_block, pubsub): else: self._rx_rate = rate self._rx_path.set_rate(self._rx_rate) - return self._u.set_rate(rate) if self.live_source() else 0 + if self._options.source in ("osmocom"): + return self._u.set_sample_rate(rate) + if self._options.source in ("uhd"): + return self._u.set_rate(rate) + else: + return 0 def set_threshold(self, threshold): self._rx_path.set_threshold(threshold) diff --git a/python/rx_path.py b/python/rx_path.py index f948b97..b89ff2d 100644 --- a/python/rx_path.py +++ b/python/rx_path.py @@ -65,13 +65,13 @@ class rx_path(gr.hier_block2): self.connect(self._sync, self._slicer) def set_rate(self, rate): - self._sync.set_rate(rate) + self._sync.set_rate(int(rate)) self._spc = int(rate/2e6) self._avg.set_length_and_scale(48*self._spc, 1.0/(48*self._spc)) if self._bb != self._demod: self._pmf.set_length_and_scale(self._spc, 1.0/self._spc) - if self._dcblock is not None: - self._dcblock.set_length(100*self._spc) +# if self._dcblock is not None: +# self._dcblock.set_length(100*self._spc) def set_threshold(self, threshold): self._sync.set_threshold(threshold)