Live sample rate changing for RTL devices in modes_gui

This commit is contained in:
Nick Foster
2014-09-21 19:28:44 -07:00
parent 78c5500c80
commit 48f9c2a29a
2 changed files with 9 additions and 4 deletions

View File

@@ -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)