diff options
author | Tom | 2010-01-02 16:47:00 -0500 |
---|---|---|
committer | Tom | 2010-01-02 16:47:00 -0500 |
commit | dafe4d73fec32dfa4cbc687e3b4489784c33db92 (patch) | |
tree | 819384ca21a5640def5304ad5ae773bb43cdeb7c /gnuradio-examples/python/digital | |
parent | 991ffe1dcc5ddacc4e2083d8494a9e92034aa70a (diff) | |
download | gnuradio-dafe4d73fec32dfa4cbc687e3b4489784c33db92.tar.gz gnuradio-dafe4d73fec32dfa4cbc687e3b4489784c33db92.tar.bz2 gnuradio-dafe4d73fec32dfa4cbc687e3b4489784c33db92.zip |
Fixing up loopback benchmark program for new DBPSK receiver.
Diffstat (limited to 'gnuradio-examples/python/digital')
3 files changed, 327 insertions, 308 deletions
diff --git a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py index 9e4e8c712..4050d498b 100755 --- a/gnuradio-examples/python/digital/benchmark_qt_loopback2.py +++ b/gnuradio-examples/python/digital/benchmark_qt_loopback2.py @@ -52,9 +52,9 @@ class dialog_box(QtGui.QMainWindow): self.set_frequency(self.fg.frequency_offset()) self.set_time_offset(self.fg.timing_offset()) - self.set_alpha_time(self.fg.rx_timing_gain_alpha()) - self.set_beta_time(self.fg.rx_timing_gain_beta()) - self.set_alpha_phase(self.fg.rx_phase_gain_alpha()) + self.set_gain_clock(self.fg.rx_gain_clock()) + self.set_gain_phase(self.fg.rx_gain_phase()) + self.set_gain_freq(self.fg.rx_gain_freq()) # Add the qtsnk widgets to the hlayout box self.gui.sinkLayout.addWidget(snkTx) @@ -75,12 +75,12 @@ class dialog_box(QtGui.QMainWindow): self.connect(self.gui.timeEdit, QtCore.SIGNAL("editingFinished()"), self.timeEditText) - self.connect(self.gui.alphaTimeEdit, QtCore.SIGNAL("editingFinished()"), - self.alphaTimeEditText) - self.connect(self.gui.betaTimeEdit, QtCore.SIGNAL("editingFinished()"), - self.betaTimeEditText) - self.connect(self.gui.alphaPhaseEdit, QtCore.SIGNAL("editingFinished()"), - self.alphaPhaseEditText) + self.connect(self.gui.gainClockEdit, QtCore.SIGNAL("editingFinished()"), + self.gainClockEditText) + self.connect(self.gui.gainPhaseEdit, QtCore.SIGNAL("editingFinished()"), + self.gainPhaseEditText) + self.connect(self.gui.gainFreqEdit, QtCore.SIGNAL("editingFinished()"), + self.gainFreqEditText) # Build a timer to update the packet number and PER fields self.update_delay = 250 # time between updating packet rate fields @@ -145,6 +145,16 @@ class dialog_box(QtGui.QMainWindow): # Accessor functions for Gui to manipulate receiver parameters + def set_gain_clock(self, gain): + self.gui.gainClockEdit.setText(QtCore.QString("%1").arg(gain)) + + def set_gain_phase(self, gain_phase): + self.gui.gainPhaseEdit.setText(QtCore.QString("%1").arg(gain_phase)) + + def set_gain_freq(self, gain_freq): + self.gui.gainFreqEdit.setText(QtCore.QString("%1").arg(gain_freq)) + + def set_alpha_time(self, alpha): self.gui.alphaTimeEdit.setText(QtCore.QString("%1").arg(alpha)) @@ -154,24 +164,24 @@ class dialog_box(QtGui.QMainWindow): def set_alpha_phase(self, alpha): self.gui.alphaPhaseEdit.setText(QtCore.QString("%1").arg(alpha)) - def alphaPhaseEditText(self): + def gainPhaseEditText(self): try: - alpha = self.gui.alphaPhaseEdit.text().toDouble()[0] - self.fg.set_rx_phase_gain_alpha(alpha) + gain_phase = self.gui.gainPhaseEdit.text().toDouble()[0] + self.fg.set_rx_gain_phase(gain_phase) except RuntimeError: pass - def alphaTimeEditText(self): + def gainClockEditText(self): try: - alpha = self.gui.alphaTimeEdit.text().toDouble()[0] - self.fg.set_rx_timing_gain_alpha(alpha) + gain = self.gui.gainClockEdit.text().toDouble()[0] + self.fg.set_rx_gain_clock(gain) except RuntimeError: pass - def betaTimeEditText(self): + def gainFreqEditText(self): try: - beta = self.gui.betaTimeEdit.text().toDouble()[0] - self.fg.set_rx_timing_gain_beta(beta) + gain = self.gui.gainFreqEdit.text().toDouble()[0] + self.fg.set_rx_gain_freq(gain) except RuntimeError: pass @@ -186,7 +196,7 @@ class dialog_box(QtGui.QMainWindow): 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)) + self.gui.perEdit.setText(QtCore.QString("%1").arg(per, 0, 'e', 4)) @@ -218,9 +228,9 @@ 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_beta = self.rxpath.packet_receiver._demodulator._timing_beta - self._phase_gain_alpha = self.rxpath.packet_receiver._demodulator._costas_alpha + self._gain_clock = self.rxpath.packet_receiver._demodulator._timing_alpha + self._gain_phase = self.rxpath.packet_receiver._demodulator._costas_alpha + self._gain_freq = self.rxpath.packet_receiver._demodulator._freq_alpha if channelon: self.channel = gr.channel_model(self._noise_voltage, @@ -254,16 +264,18 @@ class my_top_block(gr.top_block): 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.freq_recov self.phase_recov = self.rxpath.packet_receiver._demodulator.phase_recov self.time_recov = self.rxpath.packet_receiver._demodulator.time_recov - self.phase_recov.set_alpha(self._phase_gain_alpha) - self.phase_recov.set_beta(0.25*self._phase_gain_alpha*self._phase_gain_alpha) - self.time_recov.set_alpha(self._timing_gain_alpha) - self.time_recov.set_beta(self._timing_gain_beta) + self.freq_recov.set_alpha(self._gain_freq) + self.phase_recov.set_alpha(self._gain_phase) + self.phase_recov.set_beta(0.25*self._gain_phase*self._gain_phase) + self.time_recov.set_alpha(self._gain_clock) + self.time_recov.set_beta(0.25*self._gain_clock*self._gain_clock) + + # Connect to the QT sinks + # FIXME: make better exposure to receiver from rxpath self.connect(self.channel, self.snk_tx) self.connect(self.phase_recov, self.snk_rx) #self.connect(self.freq_recov, self.snk_rx) @@ -323,32 +335,39 @@ class my_top_block(gr.top_block): # Receiver Parameters - def rx_timing_gain_alpha(self): - return self._timing_gain_alpha + def rx_gain_clock(self): + return self._gain_clock - def rx_timing_gain_beta(self): - return self._timing_gain_beta - - def set_rx_timing_gain_alpha(self, gain): - self._timing_gain_alpha = gain - self.time_recov.set_alpha(self._timing_gain_alpha) + def rx_gain_clock_beta(self): + return self._gain_clock_beta - def set_rx_timing_gain_beta(self, gain): - self._timing_gain_beta = gain - self.time_recov.set_beta(self._timing_gain_beta) + def set_rx_gain_clock(self, gain): + self._gain_clock = gain + self._gain_clock_beta = .25 * self._gain_clock * self._gain_clock + self.rxpath.packet_receiver._demodulator.time_recov.set_alpha(self._gain_clock) + self.rxpath.packet_receiver._demodulator.time_recov.set_beta(self._gain_clock_beta) - def rx_phase_gain_alpha(self): - return self._phase_gain_alpha + def rx_gain_phase(self): + return self._gain_phase - def rx_phase_gain_beta(self): - return self._phase_gain_beta + def rx_gain_phase_beta(self): + return self._gain_phase_beta - def set_rx_phase_gain_alpha(self, alpha): - self._phase_gain_alpha = alpha - self._phase_gain_beta = .25 * self._phase_gain_alpha * self._phase_gain_alpha - self.phase_recov.set_alpha(self._phase_gain_alpha) - self.phase_recov.set_beta(self._phase_gain_beta) + def set_rx_gain_phase(self, gain_phase): + self._gain_phase = gain_phase + self._gain_phase_beta = .25 * self._gain_phase * self._gain_phase + self.rxpath.packet_receiver._demodulator.phase_recov.set_alpha(self._gain_phase) + self.rxpath.packet_receiver._demodulator.phase_recov.set_beta(self._gain_phase_beta) + + + def rx_gain_freq(self): + return self._gain_freq + def set_rx_gain_freq(self, gain_freq): + self._gain_freq = gain_freq + #self._gain_freq_beta = .25 * self._gain_freq * self._gain_freq + self.rxpath.packet_receiver._demodulator.freq_recov.set_alpha(self._gain_freq) + #self.rxpath.packet_receiver._demodulator.freq_recov.set_beta(self._gain_fre_beta) # ///////////////////////////////////////////////////////////////////////////// diff --git a/gnuradio-examples/python/digital/qt_digital_window2.py b/gnuradio-examples/python/digital/qt_digital_window2.py index 20502508d..98745dfe8 100644 --- a/gnuradio-examples/python/digital/qt_digital_window2.py +++ b/gnuradio-examples/python/digital/qt_digital_window2.py @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'qt_digital_window2.ui' # -# Created: Sun Dec 20 22:08:51 2009 +# Created: Sat Jan 2 16:42:30 2010 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! @@ -17,21 +17,25 @@ class Ui_DigitalWindow(object): self.centralwidget.setObjectName("centralwidget") self.gridLayout = QtGui.QGridLayout(self.centralwidget) self.gridLayout.setObjectName("gridLayout") - self.verticalLayout = QtGui.QVBoxLayout() - self.verticalLayout.setObjectName("verticalLayout") - self.pauseButton = QtGui.QPushButton(self.centralwidget) - self.pauseButton.setMinimumSize(QtCore.QSize(80, 0)) - self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215)) - self.pauseButton.setObjectName("pauseButton") - self.verticalLayout.addWidget(self.pauseButton) - spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) - self.verticalLayout.addItem(spacerItem) - self.closeButton = QtGui.QPushButton(self.centralwidget) - self.closeButton.setMinimumSize(QtCore.QSize(80, 0)) - self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215)) - self.closeButton.setObjectName("closeButton") - self.verticalLayout.addWidget(self.closeButton) - self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1) + self.verticalLayout_5 = QtGui.QVBoxLayout() + self.verticalLayout_5.setObjectName("verticalLayout_5") + self.sinkFrame = QtGui.QFrame(self.centralwidget) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth()) + self.sinkFrame.setSizePolicy(sizePolicy) + self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550)) + self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel) + self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised) + self.sinkFrame.setObjectName("sinkFrame") + self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame) + self.gridLayout_2.setObjectName("gridLayout_2") + self.sinkLayout = QtGui.QHBoxLayout() + self.sinkLayout.setObjectName("sinkLayout") + self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1) + self.verticalLayout_5.addWidget(self.sinkFrame) + self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6) self.channelModeBox = QtGui.QGroupBox(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -73,48 +77,21 @@ class Ui_DigitalWindow(object): self.timeEdit.setObjectName("timeEdit") self.formLayout_2.setWidget(2, QtGui.QFormLayout.FieldRole, self.timeEdit) self.gridLayout.addWidget(self.channelModeBox, 2, 1, 1, 1) - self.verticalLayout_2 = QtGui.QVBoxLayout() - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.sysBox = QtGui.QGroupBox(self.centralwidget) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth()) - self.sysBox.setSizePolicy(sizePolicy) - self.sysBox.setMinimumSize(QtCore.QSize(240, 60)) - self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215)) - self.sysBox.setObjectName("sysBox") - self.formLayoutWidget = QtGui.QWidget(self.sysBox) - self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31)) - self.formLayoutWidget.setObjectName("formLayoutWidget") - self.formLayout = QtGui.QFormLayout(self.formLayoutWidget) - self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize) - self.formLayout.setVerticalSpacing(20) - self.formLayout.setObjectName("formLayout") - self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth()) - self.sampleRateEdit.setSizePolicy(sizePolicy) - self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26)) - self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26)) - self.sampleRateEdit.setObjectName("sampleRateEdit") - self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit) - self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) - sizePolicy.setHorizontalStretch(0) - sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth()) - self.sampleRateLabel.setSizePolicy(sizePolicy) - self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20)) - self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20)) - self.sampleRateLabel.setObjectName("sampleRateLabel") - self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel) - self.verticalLayout_2.addWidget(self.sysBox) - spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) - self.verticalLayout_2.addItem(spacerItem1) - self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1) + self.verticalLayout = QtGui.QVBoxLayout() + self.verticalLayout.setObjectName("verticalLayout") + self.pauseButton = QtGui.QPushButton(self.centralwidget) + self.pauseButton.setMinimumSize(QtCore.QSize(80, 0)) + self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215)) + self.pauseButton.setObjectName("pauseButton") + self.verticalLayout.addWidget(self.pauseButton) + spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + self.verticalLayout.addItem(spacerItem) + self.closeButton = QtGui.QPushButton(self.centralwidget) + self.closeButton.setMinimumSize(QtCore.QSize(80, 0)) + self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215)) + self.closeButton.setObjectName("closeButton") + self.verticalLayout.addWidget(self.closeButton) + self.gridLayout.addLayout(self.verticalLayout, 2, 5, 1, 1) self.rxBox_2 = QtGui.QGroupBox(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -156,27 +133,50 @@ class Ui_DigitalWindow(object): self.perEdit.setObjectName("perEdit") self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit) self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1) - spacerItem2 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) - self.gridLayout.addItem(spacerItem2, 2, 4, 1, 1) - self.verticalLayout_5 = QtGui.QVBoxLayout() - self.verticalLayout_5.setObjectName("verticalLayout_5") - self.sinkFrame = QtGui.QFrame(self.centralwidget) - sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding) + spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) + self.gridLayout.addItem(spacerItem1, 2, 4, 1, 1) + self.verticalLayout_2 = QtGui.QVBoxLayout() + self.verticalLayout_2.setObjectName("verticalLayout_2") + self.sysBox = QtGui.QGroupBox(self.centralwidget) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) - sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth()) - self.sinkFrame.setSizePolicy(sizePolicy) - self.sinkFrame.setMinimumSize(QtCore.QSize(500, 550)) - self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel) - self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised) - self.sinkFrame.setObjectName("sinkFrame") - self.gridLayout_2 = QtGui.QGridLayout(self.sinkFrame) - self.gridLayout_2.setObjectName("gridLayout_2") - self.sinkLayout = QtGui.QHBoxLayout() - self.sinkLayout.setObjectName("sinkLayout") - self.gridLayout_2.addLayout(self.sinkLayout, 1, 0, 1, 1) - self.verticalLayout_5.addWidget(self.sinkFrame) - self.gridLayout.addLayout(self.verticalLayout_5, 0, 0, 1, 6) + sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth()) + self.sysBox.setSizePolicy(sizePolicy) + self.sysBox.setMinimumSize(QtCore.QSize(240, 60)) + self.sysBox.setMaximumSize(QtCore.QSize(240, 16777215)) + self.sysBox.setObjectName("sysBox") + self.formLayoutWidget = QtGui.QWidget(self.sysBox) + self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 211, 31)) + self.formLayoutWidget.setObjectName("formLayoutWidget") + self.formLayout = QtGui.QFormLayout(self.formLayoutWidget) + self.formLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize) + self.formLayout.setVerticalSpacing(20) + self.formLayout.setObjectName("formLayout") + self.sampleRateEdit = QtGui.QLineEdit(self.formLayoutWidget) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sampleRateEdit.sizePolicy().hasHeightForWidth()) + self.sampleRateEdit.setSizePolicy(sizePolicy) + self.sampleRateEdit.setMinimumSize(QtCore.QSize(60, 26)) + self.sampleRateEdit.setMaximumSize(QtCore.QSize(80, 26)) + self.sampleRateEdit.setObjectName("sampleRateEdit") + self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.sampleRateEdit) + self.sampleRateLabel = QtGui.QLabel(self.formLayoutWidget) + sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) + sizePolicy.setHorizontalStretch(0) + sizePolicy.setVerticalStretch(0) + sizePolicy.setHeightForWidth(self.sampleRateLabel.sizePolicy().hasHeightForWidth()) + self.sampleRateLabel.setSizePolicy(sizePolicy) + self.sampleRateLabel.setMinimumSize(QtCore.QSize(0, 20)) + self.sampleRateLabel.setMaximumSize(QtCore.QSize(16777215, 20)) + self.sampleRateLabel.setObjectName("sampleRateLabel") + self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.sampleRateLabel) + self.verticalLayout_2.addWidget(self.sysBox) + spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed) + self.verticalLayout_2.addItem(spacerItem2) + self.gridLayout.addLayout(self.verticalLayout_2, 2, 0, 1, 1) self.rxBox = QtGui.QGroupBox(self.centralwidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) @@ -187,34 +187,34 @@ class Ui_DigitalWindow(object): self.rxBox.setMaximumSize(QtCore.QSize(180, 16777215)) self.rxBox.setObjectName("rxBox") self.formLayoutWidget_3 = QtGui.QWidget(self.rxBox) - self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 10, 161, 101)) + self.formLayoutWidget_3.setGeometry(QtCore.QRect(10, 10, 164, 101)) self.formLayoutWidget_3.setObjectName("formLayoutWidget_3") self.formLayout_3 = QtGui.QFormLayout(self.formLayoutWidget_3) self.formLayout_3.setSizeConstraint(QtGui.QLayout.SetFixedSize) self.formLayout_3.setObjectName("formLayout_3") - self.alphaTimeLabel = QtGui.QLabel(self.formLayoutWidget_3) - self.alphaTimeLabel.setObjectName("alphaTimeLabel") - self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.alphaTimeLabel) - self.alphaPhaseLabel = QtGui.QLabel(self.formLayoutWidget_3) - self.alphaPhaseLabel.setObjectName("alphaPhaseLabel") - self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.alphaPhaseLabel) - self.alphaTimeEdit = QtGui.QLineEdit(self.formLayoutWidget_3) - self.alphaTimeEdit.setMinimumSize(QtCore.QSize(60, 0)) - self.alphaTimeEdit.setMaximumSize(QtCore.QSize(80, 16777215)) - self.alphaTimeEdit.setObjectName("alphaTimeEdit") - self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.alphaTimeEdit) - self.alphaPhaseEdit = QtGui.QLineEdit(self.formLayoutWidget_3) - self.alphaPhaseEdit.setMinimumSize(QtCore.QSize(60, 0)) - self.alphaPhaseEdit.setMaximumSize(QtCore.QSize(80, 16777215)) - self.alphaPhaseEdit.setObjectName("alphaPhaseEdit") - self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.alphaPhaseEdit) - self.betaTimeEdit = QtGui.QLineEdit(self.formLayoutWidget_3) - self.betaTimeEdit.setMaximumSize(QtCore.QSize(80, 16777215)) - self.betaTimeEdit.setObjectName("betaTimeEdit") - self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.betaTimeEdit) - self.betaTimeLabel = QtGui.QLabel(self.formLayoutWidget_3) - self.betaTimeLabel.setObjectName("betaTimeLabel") - self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.betaTimeLabel) + self.gainClockLabel = QtGui.QLabel(self.formLayoutWidget_3) + self.gainClockLabel.setObjectName("gainClockLabel") + self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainClockLabel) + self.gainPhaseLabel = QtGui.QLabel(self.formLayoutWidget_3) + self.gainPhaseLabel.setObjectName("gainPhaseLabel") + self.formLayout_3.setWidget(2, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel) + self.gainClockEdit = QtGui.QLineEdit(self.formLayoutWidget_3) + self.gainClockEdit.setMinimumSize(QtCore.QSize(60, 0)) + self.gainClockEdit.setMaximumSize(QtCore.QSize(80, 16777215)) + self.gainClockEdit.setObjectName("gainClockEdit") + self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainClockEdit) + self.gainFreqEdit = QtGui.QLineEdit(self.formLayoutWidget_3) + self.gainFreqEdit.setMinimumSize(QtCore.QSize(60, 0)) + self.gainFreqEdit.setMaximumSize(QtCore.QSize(80, 16777215)) + self.gainFreqEdit.setObjectName("gainFreqEdit") + self.formLayout_3.setWidget(2, QtGui.QFormLayout.FieldRole, self.gainFreqEdit) + self.gainPhaseEdit = QtGui.QLineEdit(self.formLayoutWidget_3) + self.gainPhaseEdit.setMaximumSize(QtCore.QSize(80, 16777215)) + self.gainPhaseEdit.setObjectName("gainPhaseEdit") + self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainPhaseEdit) + self.gainPhaseLabel_2 = QtGui.QLabel(self.formLayoutWidget_3) + self.gainPhaseLabel_2.setObjectName("gainPhaseLabel_2") + self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainPhaseLabel_2) self.gridLayout.addWidget(self.rxBox, 2, 2, 1, 1) DigitalWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(DigitalWindow) @@ -240,22 +240,22 @@ class Ui_DigitalWindow(object): def retranslateUi(self, DigitalWindow): DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) - self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) - self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8)) self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8)) self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8)) self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8)) - self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8)) - self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8)) + self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8)) + self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8)) self.rxBox_2.setTitle(QtGui.QApplication.translate("DigitalWindow", "Received Packet Info", None, QtGui.QApplication.UnicodeUTF8)) self.pktsRcvdLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Rcvd.", None, QtGui.QApplication.UnicodeUTF8)) self.pktsCorrectLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Packets Correct", None, QtGui.QApplication.UnicodeUTF8)) self.perLabel.setText(QtGui.QApplication.translate("DigitalWindow", "PER", None, QtGui.QApplication.UnicodeUTF8)) + self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8)) + self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8)) self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8)) - self.alphaTimeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha: time", None, QtGui.QApplication.UnicodeUTF8)) - self.alphaPhaseLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha: phase", None, QtGui.QApplication.UnicodeUTF8)) - self.betaTimeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Beta: time", None, QtGui.QApplication.UnicodeUTF8)) + self.gainClockLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Clock Loop Gain", None, QtGui.QApplication.UnicodeUTF8)) + self.gainPhaseLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Freq. Loop Gain", None, QtGui.QApplication.UnicodeUTF8)) + self.gainPhaseLabel_2.setText(QtGui.QApplication.translate("DigitalWindow", "Phase Loop Gain", None, QtGui.QApplication.UnicodeUTF8)) self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8)) self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8)) diff --git a/gnuradio-examples/python/digital/qt_digital_window2.ui b/gnuradio-examples/python/digital/qt_digital_window2.ui index d261cbae1..4e87ff058 100644 --- a/gnuradio-examples/python/digital/qt_digital_window2.ui +++ b/gnuradio-examples/python/digital/qt_digital_window2.ui @@ -14,60 +14,33 @@ </property> <widget class="QWidget" name="centralwidget" > <layout class="QGridLayout" name="gridLayout" > - <item row="2" column="5" > - <layout class="QVBoxLayout" name="verticalLayout" > - <item> - <widget class="QPushButton" name="pauseButton" > - <property name="minimumSize" > - <size> - <width>80</width> - <height>0</height> - </size> - </property> - <property name="maximumSize" > - <size> - <width>80</width> - <height>16777215</height> - </size> - </property> - <property name="text" > - <string>Pause</string> - </property> - </widget> - </item> + <item row="0" column="0" colspan="6" > + <layout class="QVBoxLayout" name="verticalLayout_5" > <item> - <spacer name="verticalSpacer" > - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0" > - <size> - <width>20</width> - <height>60</height> - </size> + <widget class="QFrame" name="sinkFrame" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="closeButton" > <property name="minimumSize" > <size> - <width>80</width> - <height>0</height> + <width>500</width> + <height>550</height> </size> </property> - <property name="maximumSize" > - <size> - <width>80</width> - <height>16777215</height> - </size> + <property name="frameShape" > + <enum>QFrame::StyledPanel</enum> </property> - <property name="text" > - <string>Close</string> + <property name="frameShadow" > + <enum>QFrame::Raised</enum> </property> + <layout class="QGridLayout" name="gridLayout_2" > + <item row="1" column="0" > + <layout class="QHBoxLayout" name="sinkLayout" /> + </item> + </layout> </widget> </item> </layout> @@ -184,100 +157,29 @@ </widget> </widget> </item> - <item row="2" column="0" > - <layout class="QVBoxLayout" name="verticalLayout_2" > + <item row="2" column="5" > + <layout class="QVBoxLayout" name="verticalLayout" > <item> - <widget class="QGroupBox" name="sysBox" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> + <widget class="QPushButton" name="pauseButton" > <property name="minimumSize" > <size> - <width>240</width> - <height>60</height> + <width>80</width> + <height>0</height> </size> </property> <property name="maximumSize" > <size> - <width>240</width> + <width>80</width> <height>16777215</height> </size> </property> - <property name="title" > - <string>System Parameters</string> + <property name="text" > + <string>Pause</string> </property> - <widget class="QWidget" name="formLayoutWidget" > - <property name="geometry" > - <rect> - <x>10</x> - <y>20</y> - <width>211</width> - <height>31</height> - </rect> - </property> - <layout class="QFormLayout" name="formLayout" > - <property name="sizeConstraint" > - <enum>QLayout::SetFixedSize</enum> - </property> - <property name="verticalSpacing" > - <number>20</number> - </property> - <item row="0" column="1" > - <widget class="QLineEdit" name="sampleRateEdit" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize" > - <size> - <width>60</width> - <height>26</height> - </size> - </property> - <property name="maximumSize" > - <size> - <width>80</width> - <height>26</height> - </size> - </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="sampleRateLabel" > - <property name="sizePolicy" > - <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize" > - <size> - <width>0</width> - <height>20</height> - </size> - </property> - <property name="maximumSize" > - <size> - <width>16777215</width> - <height>20</height> - </size> - </property> - <property name="text" > - <string>Sample Rate (sps)</string> - </property> - </widget> - </item> - </layout> - </widget> </widget> </item> <item> - <spacer name="verticalSpacer_2" > + <spacer name="verticalSpacer" > <property name="orientation" > <enum>Qt::Vertical</enum> </property> @@ -292,6 +194,25 @@ </property> </spacer> </item> + <item> + <widget class="QPushButton" name="closeButton" > + <property name="minimumSize" > + <size> + <width>80</width> + <height>0</height> + </size> + </property> + <property name="maximumSize" > + <size> + <width>80</width> + <height>16777215</height> + </size> + </property> + <property name="text" > + <string>Close</string> + </property> + </widget> + </item> </layout> </item> <item row="2" column="3" > @@ -425,35 +346,114 @@ </property> </spacer> </item> - <item row="0" column="0" colspan="6" > - <layout class="QVBoxLayout" name="verticalLayout_5" > + <item row="2" column="0" > + <layout class="QVBoxLayout" name="verticalLayout_2" > <item> - <widget class="QFrame" name="sinkFrame" > + <widget class="QGroupBox" name="sysBox" > <property name="sizePolicy" > - <sizepolicy vsizetype="Expanding" hsizetype="Expanding" > + <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize" > <size> - <width>500</width> - <height>550</height> + <width>240</width> + <height>60</height> </size> </property> - <property name="frameShape" > - <enum>QFrame::StyledPanel</enum> + <property name="maximumSize" > + <size> + <width>240</width> + <height>16777215</height> + </size> </property> - <property name="frameShadow" > - <enum>QFrame::Raised</enum> + <property name="title" > + <string>System Parameters</string> </property> - <layout class="QGridLayout" name="gridLayout_2" > - <item row="1" column="0" > - <layout class="QHBoxLayout" name="sinkLayout" /> - </item> - </layout> + <widget class="QWidget" name="formLayoutWidget" > + <property name="geometry" > + <rect> + <x>10</x> + <y>20</y> + <width>211</width> + <height>31</height> + </rect> + </property> + <layout class="QFormLayout" name="formLayout" > + <property name="sizeConstraint" > + <enum>QLayout::SetFixedSize</enum> + </property> + <property name="verticalSpacing" > + <number>20</number> + </property> + <item row="0" column="1" > + <widget class="QLineEdit" name="sampleRateEdit" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize" > + <size> + <width>60</width> + <height>26</height> + </size> + </property> + <property name="maximumSize" > + <size> + <width>80</width> + <height>26</height> + </size> + </property> + </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="sampleRateLabel" > + <property name="sizePolicy" > + <sizepolicy vsizetype="Fixed" hsizetype="Fixed" > + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize" > + <size> + <width>0</width> + <height>20</height> + </size> + </property> + <property name="maximumSize" > + <size> + <width>16777215</width> + <height>20</height> + </size> + </property> + <property name="text" > + <string>Sample Rate (sps)</string> + </property> + </widget> + </item> + </layout> + </widget> </widget> </item> + <item> + <spacer name="verticalSpacer_2" > + <property name="orientation" > + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0" > + <size> + <width>20</width> + <height>60</height> + </size> + </property> + </spacer> + </item> </layout> </item> <item row="2" column="2" > @@ -484,7 +484,7 @@ <rect> <x>10</x> <y>10</y> - <width>161</width> + <width>164</width> <height>101</height> </rect> </property> @@ -493,21 +493,21 @@ <enum>QLayout::SetFixedSize</enum> </property> <item row="0" column="0" > - <widget class="QLabel" name="alphaTimeLabel" > + <widget class="QLabel" name="gainClockLabel" > <property name="text" > - <string>Alpha: time</string> + <string>Clock Loop Gain</string> </property> </widget> </item> <item row="2" column="0" > - <widget class="QLabel" name="alphaPhaseLabel" > + <widget class="QLabel" name="gainPhaseLabel" > <property name="text" > - <string>Alpha: phase</string> + <string>Freq. Loop Gain</string> </property> </widget> </item> <item row="0" column="1" > - <widget class="QLineEdit" name="alphaTimeEdit" > + <widget class="QLineEdit" name="gainClockEdit" > <property name="minimumSize" > <size> <width>60</width> @@ -523,7 +523,7 @@ </widget> </item> <item row="2" column="1" > - <widget class="QLineEdit" name="alphaPhaseEdit" > + <widget class="QLineEdit" name="gainFreqEdit" > <property name="minimumSize" > <size> <width>60</width> @@ -539,7 +539,7 @@ </widget> </item> <item row="1" column="1" > - <widget class="QLineEdit" name="betaTimeEdit" > + <widget class="QLineEdit" name="gainPhaseEdit" > <property name="maximumSize" > <size> <width>80</width> @@ -549,9 +549,9 @@ </widget> </item> <item row="1" column="0" > - <widget class="QLabel" name="betaTimeLabel" > + <widget class="QLabel" name="gainPhaseLabel_2" > <property name="text" > - <string>Beta: time</string> + <string>Phase Loop Gain</string> </property> </widget> </item> |