summaryrefslogtreecommitdiff
path: root/gnuradio-examples/python/digital
diff options
context:
space:
mode:
authorTom2009-10-09 18:22:44 -0700
committerTom2009-10-09 18:22:44 -0700
commit5657ff84eca261298910b46f89e20a6a50427df8 (patch)
tree6f896dc4b73a7f67f4f6a5bb63f9f2c83e8e7916 /gnuradio-examples/python/digital
parent19e2cc4b27664a1e4fe64167b3846f3eba79db46 (diff)
downloadgnuradio-5657ff84eca261298910b46f89e20a6a50427df8.tar.gz
gnuradio-5657ff84eca261298910b46f89e20a6a50427df8.tar.bz2
gnuradio-5657ff84eca261298910b46f89e20a6a50427df8.zip
Starting to rework QT app to control new PFB clock recovery alg.
Diffstat (limited to 'gnuradio-examples/python/digital')
-rwxr-xr-xgnuradio-examples/python/digital/benchmark_qt_loopback.py36
1 files changed, 15 insertions, 21 deletions
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback.py b/gnuradio-examples/python/digital/benchmark_qt_loopback.py
index 1bfda4a96..35cc2e376 100755
--- a/gnuradio-examples/python/digital/benchmark_qt_loopback.py
+++ b/gnuradio-examples/python/digital/benchmark_qt_loopback.py
@@ -52,7 +52,7 @@ class dialog_box(QtGui.QMainWindow):
self.set_frequency(self.fg.frequency_offset())
self.set_time_offset(self.fg.timing_offset())
- self.set_gain_mu(self.fg.rx_gain_mu())
+ self.set_gain_mu(self.fg.rx_timing_gain_alpha())
self.set_alpha(self.fg.rx_alpha())
# Add the qtsnk widgets to the hlayout box
@@ -158,7 +158,7 @@ class dialog_box(QtGui.QMainWindow):
def gainMuEditText(self):
try:
gain = self.gui.gainMuEdit.text().toDouble()[0]
- self.fg.set_rx_gain_mu(gain)
+ self.fg.set_rx_timing_gain_alpha(gain)
except RuntimeError:
pass
@@ -202,7 +202,7 @@ class my_top_block(gr.top_block):
self.rxpath = receive_path(demod_class, rx_callback, options)
# FIXME: do better exposure to lower issues for control
- self._gain_mu = self.rxpath.packet_receiver._demodulator._mm_gain_mu
+ self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._timing_alpha
self._alpha = self.rxpath.packet_receiver._demodulator._costas_alpha
if channelon:
@@ -234,20 +234,20 @@ class my_top_block(gr.top_block):
self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
0, 1,
"Rx", True, True, False, True, True)
- self.snk_err = qtgui.sink_f(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
- 0, 1,
- "Error", True, True, False, False, False)
self.snk_tx.set_frequency_axis(-80, 0)
self.snk_rx.set_frequency_axis(-60, 20)
# Connect to the QT sinks
# FIXME: make better exposure to receiver from rxpath
- #self.freq_recov = self.rxpath.packet_receiver._demodulator.clock_recov
+ self.freq_recov = self.rxpath.packet_receiver._demodulator.clock_recov
self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov
+ self.freq_recov.set_alpha(0)
+ self.freq_recov.set_beta(0)
+ self.time_recov.set_alpha(2)
+ self.time_recov.set_beta(0.02)
self.connect(self.channel, self.snk_tx)
self.connect(self.time_recov, self.snk_rx)
- self.connect((self.time_recov, 1), self.snk_err)
pyTxQt = self.snk_tx.pyqwidget()
pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget)
@@ -255,9 +255,6 @@ class my_top_block(gr.top_block):
pyRxQt = self.snk_rx.pyqwidget()
pyRx = sip.wrapinstance(pyRxQt, QtGui.QWidget)
- pyErrQt = self.snk_err.pyqwidget()
- pyErr = sip.wrapinstance(pyRxQt, QtGui.QWidget)
-
self.main_box = dialog_box(pyTx, pyRx, self)
self.main_box.show()
@@ -307,18 +304,15 @@ class my_top_block(gr.top_block):
# Receiver Parameters
- def rx_gain_mu(self):
- return self._gain_mu
+ def rx_timing_gain_alpha(self):
+ return self._timing_gain_alpha
- def rx_gain_omega(self):
- return self.gain_omega
+ def rx_timing_gain_beta(self):
+ return self._timing_gain_beta
- def set_rx_gain_mu(self, gain):
- self._gain_mu = gain
- self.gain_omega = .25 * self._gain_mu * self._gain_mu
- #self.time_recov.set_gain_mu(self._gain_mu)
- #self.time_recov.set_gain_omega(self.gain_omega)
- self.time_recov.set_gain(self._gain_mu)
+ def set_rx_timing_gain_alpha(self, gain):
+ self._timing_gain_alpha = gain
+ self.time_recov.set_gain(self._timing_gain_alpha)
def rx_alpha(self):
return self._alpha