diff options
author | Tom Rondeau | 2010-05-10 20:20:47 -0400 |
---|---|---|
committer | Tom Rondeau | 2010-05-10 20:20:47 -0400 |
commit | b682d4bbe98b72e86219f1f303843b4f4f9ed1b7 (patch) | |
tree | 0ef131a41c51a965f11f43ecd56cd1aba4a45ef8 /gnuradio-examples | |
parent | f20b3e2a48a4b9ae7a8b87b1361749c290d99e39 (diff) | |
download | gnuradio-b682d4bbe98b72e86219f1f303843b4f4f9ed1b7.tar.gz gnuradio-b682d4bbe98b72e86219f1f303843b4f4f9ed1b7.tar.bz2 gnuradio-b682d4bbe98b72e86219f1f303843b4f4f9ed1b7.zip |
Fixing benchmark program to work with original dbpsk/dqpsk modulations again (and saving the version 2 mods for those marked v2).
Diffstat (limited to 'gnuradio-examples')
-rwxr-xr-x | gnuradio-examples/python/digital/benchmark_qt_loopback.py | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback.py b/gnuradio-examples/python/digital/benchmark_qt_loopback.py index 35cc2e376..0ae0e4e51 100755 --- a/gnuradio-examples/python/digital/benchmark_qt_loopback.py +++ b/gnuradio-examples/python/digital/benchmark_qt_loopback.py @@ -167,7 +167,10 @@ class dialog_box(QtGui.QMainWindow): # Pull these globals in from the main thread global n_rcvd, n_right, pktno - per = float(n_rcvd - n_right)/float(pktno) + if(pktno > 0): + per = float(n_rcvd - n_right)/float(pktno) + else: + per = 0 self.gui.pktsRcvdEdit.setText(QtCore.QString("%1").arg(n_rcvd)) self.gui.pktsCorrectEdit.setText(QtCore.QString("%1").arg(n_right)) self.gui.perEdit.setText(QtCore.QString("%1").arg(per)) @@ -186,6 +189,9 @@ class my_top_block(gr.top_block): self._sample_rate = options.sample_rate + if(options.samples_per_symbol is None): + options.samples_per_symbol = 2 + channelon = True; self.gui_on = options.gui @@ -202,7 +208,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._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._timing_alpha + self._timing_gain_alpha = self.rxpath.packet_receiver._demodulator._mm_gain_mu self._alpha = self.rxpath.packet_receiver._demodulator._costas_alpha if channelon: @@ -229,10 +235,10 @@ class my_top_block(gr.top_block): fftsize = 2048 self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, - 0, 1, + 0, self._sample_rate, "Tx", True, True, False, True, True) self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, - 0, 1, + 0, self._sample_rate, "Rx", True, True, False, True, True) self.snk_tx.set_frequency_axis(-80, 0) @@ -240,14 +246,11 @@ class my_top_block(gr.top_block): # Connect to the QT sinks # FIXME: make better exposure to receiver from rxpath - 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.receiver = self.rxpath.packet_receiver._demodulator.receiver + self.receiver.set_alpha(2) + self.receiver.set_beta(0.02) self.connect(self.channel, self.snk_tx) - self.connect(self.time_recov, self.snk_rx) + self.connect(self.receiver, self.snk_rx) pyTxQt = self.snk_tx.pyqwidget() pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget) @@ -312,7 +315,7 @@ class my_top_block(gr.top_block): def set_rx_timing_gain_alpha(self, gain): self._timing_gain_alpha = gain - self.time_recov.set_gain(self._timing_gain_alpha) + self.receiver.set_gain_mu(self._timing_gain_alpha) def rx_alpha(self): return self._alpha @@ -323,8 +326,8 @@ class my_top_block(gr.top_block): def set_rx_alpha(self, alpha): self._alpha = alpha self.beta = .25 * self._alpha * self._alpha - #self.freq_recov.set_alpha(self._alpha) - #self.freq_recov.set_beta(self.beta) + self.receiver.set_alpha(self._alpha) + self.receiver.set_beta(self.beta) |