dnl
dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
- dnl MINOR_VERSION Minor release version
+ dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.)
dnl MAINT_VERSION Pure bugfix additions to make maintenance release
dnl
dnl The last two fields can have 'git' instead of a number to indicate
RELEASE=$RELEASE-$GIT_VERSION
fi
else
- dnl This is a numbered reelase.
- dnl Test if minor version is 0, which we don't encode, unless it is also
- dnl a maintenance release
- if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
- dnl 3.3.1
- RELEASE=$RELEASE.$MINOR_VERSION
- if test "$MAINT_VERSION" != "0"; then
- dnl 3.3.0.1, 3.3.1.1
- RELEASE=$RELEASE.$MAINT_VERSION
- fi
- DOCVER=$RELEASE
+ dnl This is a numbered release.
+ RELEASE=$RELEASE.$MINOR_VERSION
+ if test "$MAINT_VERSION" != "0"; then
+ RELEASE=$RELEASE.$MAINT_VERSION
fi
+
+ DOCVER=$RELEASE
fi
fi
AC_ENABLE_SHARED dnl do build shared libraries
AC_DISABLE_STATIC dnl don't build static libraries
m4_ifdef([LT_INIT],[LT_INIT],[AC_PROG_LIBTOOL])
-GR_FORTRAN
+dnl GR_FORTRAN
GR_NO_UNDEFINED dnl do we need the -no-undefined linker flag
GR_SCRIPTING
include $(top_srcdir)/Makefile.common
-EXTRA_DIST = praxis.txt simpson.h
+EXTRA_DIST = praxis.txt simpson.h objective_fct.c gen_interpolator_taps.c simpson.c praxis.f
-if ENABLE_FORTRAN
-noinst_PROGRAMS = gen_interpolator_taps
-noinst_HEADERS = simpson.h
-
-gen_interpolator_taps_SOURCES = gen_interpolator_taps.c objective_fct.c simpson.c praxis.f
-gen_interpolator_taps_LDADD = $(FLIBS) -lm
-
-endif
+# if ENABLE_FORTRAN
+# noinst_PROGRAMS = gen_interpolator_taps
+# noinst_HEADERS = simpson.h
+#
+# gen_interpolator_taps_SOURCES = gen_interpolator_taps.c objective_fct.c simpson.c praxis.f
+# gen_interpolator_taps_LDADD = $(FLIBS) -lm
+#
+# endif
# 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))
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
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:
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)
# 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)
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
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)
# FIXME: do better exposure to lower issues for control
self._gain_clock = self.rxpath.packet_receiver._demodulator._timing_alpha
- self._gain_phase = self.rxpath.packet_receiver._demodulator._costas_alpha
+ self._gain_phase = self.rxpath.packet_receiver._demodulator._phase_alpha
self._gain_freq = self.rxpath.packet_receiver._demodulator._freq_alpha
if channelon:
# Form implementation generated from reading ui file 'qt_digital_window.ui'
#
-# Created: Tue Oct 6 11:27:37 2009
-# by: PyQt4 UI code generator 4.4.4
+# Created: Tue May 11 20:58:35 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1019, 754)
+ DigitalWindow.resize(1059, 754)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.verticalLayout_3 = QtGui.QVBoxLayout()
- self.verticalLayout_3.setObjectName("verticalLayout_3")
- self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ self.verticalLayout_4 = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout_4.setObjectName("verticalLayout_4")
+ self.sinkLayout = QtGui.QHBoxLayout()
+ self.sinkLayout.setObjectName("sinkLayout")
+ self.verticalLayout_4.addLayout(self.sinkLayout)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ 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.rxBox.sizePolicy().hasHeightForWidth())
- self.rxBox.setSizePolicy(sizePolicy)
- self.rxBox.setMinimumSize(QtCore.QSize(180, 90))
- 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, 20, 141, 61))
- 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.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.gainMuLabel.setObjectName("gainMuLabel")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
- self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
- self.alphaLabel.setObjectName("alphaLabel")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
- self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.gainMuEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.gainMuEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.gainMuEdit.setObjectName("gainMuEdit")
- self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
- self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
- self.alphaEdit.setMinimumSize(QtCore.QSize(60, 0))
- self.alphaEdit.setMaximumSize(QtCore.QSize(80, 16777215))
- self.alphaEdit.setObjectName("alphaEdit")
- self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
- self.verticalLayout_3.addWidget(self.rxBox)
- spacerItem = QtGui.QSpacerItem(20, 30, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_3.addItem(spacerItem)
- self.gridLayout.addLayout(self.verticalLayout_3, 2, 2, 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)
- spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout.addItem(spacerItem1)
- 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)
+ 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)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_2.addItem(spacerItem)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
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)
+ self.horizontalLayout.addWidget(self.channelModeBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
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)
+ sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+ self.rxBox.setSizePolicy(sizePolicy)
+ self.rxBox.setMinimumSize(QtCore.QSize(220, 130))
+ 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, 20, 201, 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.gainMuLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.gainMuLabel.setObjectName("gainMuLabel")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.LabelRole, self.gainMuLabel)
+ self.alphaLabel = QtGui.QLabel(self.formLayoutWidget_3)
+ self.alphaLabel.setObjectName("alphaLabel")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.LabelRole, self.alphaLabel)
+ self.gainMuEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.gainMuEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.gainMuEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.gainMuEdit.setObjectName("gainMuEdit")
+ self.formLayout_3.setWidget(0, QtGui.QFormLayout.FieldRole, self.gainMuEdit)
+ self.alphaEdit = QtGui.QLineEdit(self.formLayoutWidget_3)
+ self.alphaEdit.setMinimumSize(QtCore.QSize(60, 0))
+ self.alphaEdit.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.alphaEdit.setObjectName("alphaEdit")
+ self.formLayout_3.setWidget(1, QtGui.QFormLayout.FieldRole, self.alphaEdit)
+ self.horizontalLayout.addWidget(self.rxBox)
self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
self.rxBox_2.setObjectName("rxBox_2")
self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
- self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 181, 92))
+ self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 201, 91))
self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.perEdit.setObjectName("perEdit")
self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
- self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
- spacerItem3 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.gridLayout.addItem(spacerItem3, 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)
- 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.horizontalLayout.addWidget(self.rxBox_2)
+ spacerItem1 = QtGui.QSpacerItem(20, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem1)
+ 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)
+ spacerItem2 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout.addItem(spacerItem2)
+ 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.horizontalLayout.addLayout(self.verticalLayout)
+ self.verticalLayout_4.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 25))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1059, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
- self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
- self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", 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.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.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.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
+ self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
+ self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", 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.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+ self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", 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))
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
+ <width>1059</width>
<height>754</height>
</rect>
</property>
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
- <layout class="QGridLayout" name="gridLayout">
- <item row="2" column="2">
- <layout class="QVBoxLayout" name="verticalLayout_3">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QGroupBox" name="rxBox">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>240</width>
+ <height>60</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>240</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>System Parameters</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 hsizetype="Fixed" vsizetype="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 hsizetype="Fixed" vsizetype="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>
+ <widget class="QGroupBox" name="channelModeBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
</property>
<property name="minimumSize">
<size>
- <width>180</width>
- <height>90</height>
+ <width>245</width>
+ <height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>180</width>
+ <width>245</width>
<height>16777215</height>
</size>
</property>
<property name="title">
- <string>Receiver Parameters</string>
+ <string>Channel Model Parameters</string>
</property>
- <widget class="QWidget" name="formLayoutWidget_3">
+ <widget class="QWidget" name="formLayoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>141</width>
- <height>61</height>
+ <width>221</width>
+ <height>98</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout_3">
+ <layout class="QFormLayout" name="formLayout_2">
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
<item row="0" column="0">
- <widget class="QLabel" name="gainMuLabel">
+ <widget class="QLabel" name="snrLabel">
<property name="text">
- <string>Gain mu</string>
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="alphaLabel">
+ <widget class="QLabel" name="freqLabel">
<property name="text">
- <string>Alpha</string>
+ <string>Frequency Offset (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="gainMuEdit">
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="freqEdit">
<property name="minimumSize">
<size>
<width>60</width>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="alphaEdit">
+ <item row="2" column="0">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="timeEdit">
<property name="minimumSize">
<size>
<width>60</width>
</item>
</layout>
</widget>
+ <zorder>formLayoutWidget_2</zorder>
+ <zorder>sysBox</zorder>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_4">
- <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>30</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <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>
- <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="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <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>220</width>
+ <height>130</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>80</width>
+ <width>180</width>
<height>16777215</height>
</size>
</property>
- <property name="text">
- <string>Close</string>
+ <property name="title">
+ <string>Receiver Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_3">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>201</width>
+ <height>101</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="text">
+ <string>Gain mu</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="alphaLabel">
+ <property name="text">
+ <string>Alpha</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- </layout>
- </item>
- <item row="2" column="1">
- <widget class="QGroupBox" name="channelModeBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>245</width>
- <height>130</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>245</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title">
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_2">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>221</width>
- <height>98</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="sizeConstraint">
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="snrLabel">
- <property name="text">
- <string>SNR (dB)</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="snrEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="freqLabel">
- <property name="text">
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="freqEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="timeLabel">
- <property name="text">
- <string>Timing Offset</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="timeEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="0">
- <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="sysBox">
+ <widget class="QGroupBox" name="rxBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
</property>
<property name="minimumSize">
<size>
- <width>240</width>
- <height>60</height>
+ <width>220</width>
+ <height>125</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>240</width>
- <height>16777215</height>
+ <width>265</width>
+ <height>125</height>
</size>
</property>
<property name="title">
- <string>System Parameters</string>
+ <string>Received Packet Info</string>
</property>
- <widget class="QWidget" name="formLayoutWidget">
+ <widget class="QWidget" name="formLayoutWidget_4">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>211</width>
- <height>31</height>
+ <width>201</width>
+ <height>91</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout">
+ <layout class="QFormLayout" name="formLayout_4">
<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 hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="0" column="0">
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="text">
+ <string>Packets Rcvd.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="text">
+ <string>Packets Correct</string>
</property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="perLabel">
+ <property name="text">
+ <string>PER</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="pktsRcvdEdit">
<property name="minimumSize">
<size>
<width>60</width>
- <height>26</height>
+ <height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>80</width>
- <height>26</height>
+ <height>16777215</height>
</size>
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QLabel" name="sampleRateLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="pktsCorrectEdit">
<property name="minimumSize">
<size>
- <width>0</width>
- <height>20</height>
+ <width>60</width>
+ <height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
- <width>16777215</width>
- <height>20</height>
+ <width>80</width>
+ <height>16777215</height>
</size>
</property>
- <property name="text">
- <string>Sample Rate (sps)</string>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="perEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2">
+ <spacer name="horizontalSpacer">
<property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
+ <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>60</height>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
- </layout>
- </item>
- <item row="2" column="3">
- <widget class="QGroupBox" name="rxBox_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>220</width>
- <height>125</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>265</width>
- <height>125</height>
- </size>
- </property>
- <property name="title">
- <string>Received Packet Info</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_4">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>20</y>
- <width>181</width>
- <height>92</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_4">
- <property name="sizeConstraint">
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="pktsRcvdLabel">
- <property name="text">
- <string>Packets Rcvd.</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="pktsCorrectLabel">
- <property name="text">
- <string>Packets Correct</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="perLabel">
- <property name="text">
- <string>PER</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="pktsRcvdEdit">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pauseButton">
<property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="pktsCorrectEdit">
- <property name="minimumSize">
- <size>
- <width>60</width>
- <height>0</height>
- </size>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="maximumSize">
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>80</width>
- <height>16777215</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
- <item row="2" column="1">
- <widget class="QLineEdit" name="perEdit">
+ <item>
+ <widget class="QPushButton" name="closeButton">
<property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Close</string>
+ </property>
</widget>
</item>
</layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="4">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="0" column="0" colspan="6">
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <widget class="QFrame" name="sinkFrame">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>500</width>
- <height>550</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <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>
</item>
</layout>
- <zorder>channelModeBox</zorder>
- <zorder></zorder>
- <zorder>rxBox_2</zorder>
- <zorder>horizontalSpacer</zorder>
- <zorder></zorder>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>25</height>
+ <width>1059</width>
+ <height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
# Form implementation generated from reading ui file 'qt_digital_window2.ui'
#
-# Created: Sat Jan 2 16:42:30 2010
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 20:55:10 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1019, 754)
+ DigitalWindow.resize(1059, 751)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- 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.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout_3.setObjectName("verticalLayout_3")
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.verticalLayout_3.addLayout(self.sinkLayout)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
+ 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)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_2.addItem(spacerItem)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
self.timeEdit.setMaximumSize(QtCore.QSize(80, 16777215))
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 = 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.horizontalLayout.addWidget(self.channelModeBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
+ self.rxBox.setSizePolicy(sizePolicy)
+ self.rxBox.setMinimumSize(QtCore.QSize(220, 130))
+ 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, 20, 201, 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.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.horizontalLayout.addWidget(self.rxBox)
self.rxBox_2 = QtGui.QGroupBox(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
self.rxBox_2.setMaximumSize(QtCore.QSize(265, 125))
self.rxBox_2.setObjectName("rxBox_2")
self.formLayoutWidget_4 = QtGui.QWidget(self.rxBox_2)
- self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 248, 188))
+ self.formLayoutWidget_4.setGeometry(QtCore.QRect(10, 20, 201, 91))
self.formLayoutWidget_4.setObjectName("formLayoutWidget_4")
self.formLayout_4 = QtGui.QFormLayout(self.formLayoutWidget_4)
self.formLayout_4.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.perEdit.setMaximumSize(QtCore.QSize(80, 16777215))
self.perEdit.setObjectName("perEdit")
self.formLayout_4.setWidget(2, QtGui.QFormLayout.FieldRole, self.perEdit)
- self.gridLayout.addWidget(self.rxBox_2, 2, 3, 1, 1)
+ self.horizontalLayout.addWidget(self.rxBox_2)
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.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)
+ self.horizontalLayout.addItem(spacerItem1)
+ 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)
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)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.rxBox.sizePolicy().hasHeightForWidth())
- self.rxBox.setSizePolicy(sizePolicy)
- self.rxBox.setMinimumSize(QtCore.QSize(180, 120))
- 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, 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.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)
+ self.verticalLayout.addItem(spacerItem2)
+ 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.horizontalLayout.addLayout(self.verticalLayout)
+ self.verticalLayout_3.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1019, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1059, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", 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.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.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.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.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.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
+ self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", 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))
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>754</height>
+ <width>1059</width>
+ <height>751</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" colspan="6" >
- <layout class="QVBoxLayout" name="verticalLayout_5" >
- <item>
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>500</width>
- <height>550</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <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>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
</item>
- <item row="2" column="1" >
- <widget class="QGroupBox" name="channelModeBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>245</width>
- <height>130</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>245</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title" >
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_2" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>221</width>
- <height>98</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_2" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy" >
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="snrLabel" >
- <property name="text" >
- <string>SNR (dB)</string>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="snrEdit" >
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>60</width>
- <height>0</height>
+ <width>240</width>
+ <height>60</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>240</width>
<height>16777215</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="freqLabel" >
- <property name="text" >
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="freqEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
+ <property name="title">
+ <string>System Parameters</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 hsizetype="Fixed" vsizetype="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 hsizetype="Fixed" vsizetype="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 row="2" column="0" >
- <widget class="QLabel" name="timeLabel" >
- <property name="text" >
- <string>Timing Offset</string>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="timeEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
</property>
- <property name="maximumSize" >
+ <property name="sizeHint" stdset="0">
<size>
- <width>80</width>
- <height>16777215</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
- </widget>
- </widget>
- </item>
- <item row="2" column="5" >
- <layout class="QVBoxLayout" name="verticalLayout" >
+ </item>
<item>
- <widget class="QPushButton" name="pauseButton" >
- <property name="minimumSize" >
+ <widget class="QGroupBox" name="channelModeBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
<size>
- <width>80</width>
- <height>0</height>
+ <width>245</width>
+ <height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>245</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Pause</string>
+ <property name="title">
+ <string>Channel Model Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_2">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>221</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="snrLabel">
+ <property name="text">
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
+ <string>Frequency Offset (Hz)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="timeEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
<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="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="closeButton" >
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>80</width>
- <height>0</height>
+ <width>220</width>
+ <height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>80</width>
+ <width>180</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Close</string>
+ <property name="title">
+ <string>Receiver Parameters</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget_3">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>20</y>
+ <width>201</width>
+ <height>101</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainClockLabel">
+ <property name="text">
+ <string>Clock Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="gainPhaseLabel">
+ <property name="text">
+ <string>Freq. Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainClockEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="gainFreqEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="gainPhaseEdit">
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="gainPhaseLabel_2">
+ <property name="text">
+ <string>Phase Loop Gain</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
</widget>
</item>
- </layout>
- </item>
- <item row="2" column="3" >
- <widget class="QGroupBox" name="rxBox_2" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>220</width>
- <height>125</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>265</width>
- <height>125</height>
- </size>
- </property>
- <property name="title" >
- <string>Received Packet Info</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_4" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>20</y>
- <width>248</width>
- <height>188</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_4" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <property name="fieldGrowthPolicy" >
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="text" >
- <string>Packets Rcvd.</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="text" >
- <string>Packets Correct</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="perLabel" >
- <property name="text" >
- <string>PER</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="perEdit" >
- <property name="minimumSize" >
- <size>
- <width>60</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>80</width>
- <height>16777215</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- <zorder>pktsRcvdLabel</zorder>
- <zorder>pktsCorrectLabel</zorder>
- <zorder>perLabel</zorder>
- <zorder>pktsRcvdEdit</zorder>
- <zorder>pktsCorrectEdit</zorder>
- <zorder>perEdit</zorder>
- </widget>
- </widget>
- </item>
- <item row="2" column="4" >
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="2" column="0" >
- <layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
- <widget class="QGroupBox" name="sysBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
- <width>240</width>
- <height>60</height>
+ <width>220</width>
+ <height>125</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>240</width>
- <height>16777215</height>
+ <width>265</width>
+ <height>125</height>
</size>
</property>
- <property name="title" >
- <string>System Parameters</string>
+ <property name="title">
+ <string>Received Packet Info</string>
</property>
- <widget class="QWidget" name="formLayoutWidget" >
- <property name="geometry" >
+ <widget class="QWidget" name="formLayoutWidget_4">
+ <property name="geometry">
<rect>
<x>10</x>
<y>20</y>
- <width>211</width>
- <height>31</height>
+ <width>201</width>
+ <height>91</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout" >
- <property name="sizeConstraint" >
+ <layout class="QFormLayout" name="formLayout_4">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
- <property name="verticalSpacing" >
- <number>20</number>
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</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>
+ <item row="0" column="0">
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="text">
+ <string>Packets Rcvd.</string>
</property>
- <property name="minimumSize" >
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="minimumSize">
<size>
<width>60</width>
- <height>26</height>
+ <height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
- <height>26</height>
+ <height>16777215</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>
+ <item row="1" column="0">
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="text">
+ <string>Packets Correct</string>
</property>
- <property name="minimumSize" >
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="minimumSize">
<size>
- <width>0</width>
- <height>20</height>
+ <width>60</width>
+ <height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>16777215</width>
- <height>20</height>
+ <width>80</width>
+ <height>16777215</height>
</size>
</property>
- <property name="text" >
- <string>Sample Rate (sps)</string>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="perLabel">
+ <property name="text">
+ <string>PER</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="perEdit">
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
</property>
</widget>
</item>
</layout>
+ <zorder>pktsRcvdLabel</zorder>
+ <zorder>pktsCorrectLabel</zorder>
+ <zorder>perLabel</zorder>
+ <zorder>pktsRcvdEdit</zorder>
+ <zorder>pktsCorrectEdit</zorder>
+ <zorder>perEdit</zorder>
</widget>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType" >
- <enum>QSizePolicy::Fixed</enum>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>60</height>
+ <height>20</height>
</size>
</property>
</spacer>
</item>
- </layout>
- </item>
- <item row="2" column="2" >
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>180</width>
- <height>120</height>
- </size>
- </property>
- <property name="maximumSize" >
- <size>
- <width>180</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="title" >
- <string>Receiver Parameters</string>
- </property>
- <widget class="QWidget" name="formLayoutWidget_3" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>10</y>
- <width>164</width>
- <height>101</height>
- </rect>
- </property>
- <layout class="QFormLayout" name="formLayout_3" >
- <property name="sizeConstraint" >
- <enum>QLayout::SetFixedSize</enum>
- </property>
- <item row="0" column="0" >
- <widget class="QLabel" name="gainClockLabel" >
- <property name="text" >
- <string>Clock Loop Gain</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="gainPhaseLabel" >
- <property name="text" >
- <string>Freq. Loop Gain</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="gainClockEdit" >
- <property name="minimumSize" >
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="pauseButton">
+ <property name="minimumSize">
<size>
- <width>60</width>
+ <width>80</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="gainFreqEdit" >
- <property name="minimumSize" >
+ <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>60</width>
- <height>0</height>
+ <width>20</width>
+ <height>60</height>
</size>
</property>
- <property name="maximumSize" >
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="minimumSize">
<size>
<width>80</width>
- <height>16777215</height>
+ <height>0</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="gainPhaseEdit" >
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>16777215</height>
</size>
</property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="gainPhaseLabel_2" >
- <property name="text" >
- <string>Phase Loop Gain</string>
+ <property name="text">
+ <string>Close</string>
</property>
</widget>
</item>
</layout>
- </widget>
- </widget>
+ </item>
+ </layout>
</item>
</layout>
- <zorder>channelModeBox</zorder>
- <zorder></zorder>
- <zorder>rxBox_2</zorder>
- <zorder>horizontalSpacer</zorder>
- <zorder></zorder>
- <zorder>rxBox</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1019</width>
- <height>24</height>
+ <width>1059</width>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&xit</string>
</property>
</action>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>322</x>
<y>623</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
# Form implementation generated from reading ui file 'qt_rx_window.ui'
#
-# Created: Fri Jul 3 01:03:19 2009
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 21:03:07 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1000, 816)
+ DigitalWindow.resize(999, 519)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(1)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(800, 500))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
self.sinkLayout = QtGui.QHBoxLayout()
self.sinkLayout.setObjectName("sinkLayout")
- self.horizontalLayout_2.addLayout(self.sinkLayout)
- self.gridLayout.addWidget(self.sinkFrame, 0, 0, 1, 1)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.gridLayout.addItem(spacerItem, 1, 0, 1, 1)
+ self.verticalLayout.addLayout(self.sinkLayout)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.horizontalLayout.setObjectName("horizontalLayout")
self.perEdit.setGeometry(QtCore.QRect(120, 90, 113, 23))
self.perEdit.setObjectName("perEdit")
self.verticalLayout_3.addWidget(self.rxPacketBox)
- spacerItem1 = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
- self.verticalLayout_3.addItem(spacerItem1)
+ spacerItem = QtGui.QSpacerItem(20, 60, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ self.verticalLayout_3.addItem(spacerItem)
self.horizontalLayout.addLayout(self.verticalLayout_3)
- spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout.addItem(spacerItem2)
+ spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem1)
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setObjectName("verticalLayout_5")
- spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.verticalLayout_5.addItem(spacerItem3)
+ spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.verticalLayout_5.addItem(spacerItem2)
self.closeButton = QtGui.QPushButton(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
self.closeButton.setObjectName("closeButton")
self.verticalLayout_5.addWidget(self.closeButton)
self.horizontalLayout.addLayout(self.verticalLayout_5)
- self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 1)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 999, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1000</width>
- <height>816</height>
+ <width>999</width>
+ <height>519</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>800</width>
- <height>500</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <layout class="QHBoxLayout" name="sinkLayout" />
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0" >
- <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>40</height>
- </size>
- </property>
- </spacer>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
</item>
- <item row="2" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <property name="sizeConstraint" >
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="title" >
+ <property name="title">
<string>Receiver Parameters</string>
</property>
- <widget class="QLineEdit" name="gainMuEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>120</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="gainMuLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>120</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>mu's gain</string>
</property>
</widget>
- <widget class="QLineEdit" name="alphaEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>150</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="alphaLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="alphaLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>150</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Alpha</string>
</property>
</widget>
- <widget class="QLabel" name="gainLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="gainLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Gain (dB)</string>
</property>
</widget>
- <widget class="QLineEdit" name="freqEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="freqLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="freqLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Frequency (Hz)</string>
</property>
</widget>
- <widget class="QLineEdit" name="gainEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="gainEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="decimLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="decimLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<height>17</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Decimation</string>
</property>
</widget>
- <widget class="QLineEdit" name="decimEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="decimEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
</widget>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="rxPacketBox" >
- <property name="enabled" >
+ <widget class="QGroupBox" name="rxPacketBox">
+ <property name="enabled">
<bool>true</bool>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="font" >
+ <property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
- <property name="title" >
+ <property name="title">
<string>Received Packet Info</string>
</property>
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Rcvd.</string>
</property>
</widget>
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Correct</string>
</property>
</widget>
- <widget class="QLabel" name="perLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="perLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>PER</string>
</property>
</widget>
- <widget class="QLineEdit" name="perEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="perEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
</rect>
</property>
</widget>
- <zorder>pktsRcvdEdit</zorder>
- <zorder>pktsRcvdLabel</zorder>
- <zorder>pktsCorrectEdit</zorder>
- <zorder>pktsCorrectLabel</zorder>
- <zorder>perLabel</zorder>
- <zorder>perEdit</zorder>
- <zorder>rxBox</zorder>
- <zorder>verticalLayoutWidget</zorder>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</layout>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5" >
+ <layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <spacer name="verticalSpacer_3" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</spacer>
</item>
<item>
- <widget class="QPushButton" name="closeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QPushButton" name="closeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Close</string>
</property>
</widget>
</layout>
</item>
</layout>
- <zorder>closeButton</zorder>
- <zorder>sinkFrame</zorder>
- <zorder>rxBox</zorder>
- <zorder>rxPacketBox</zorder>
- <zorder>verticalLayoutWidget</zorder>
- <zorder>verticalSpacer</zorder>
- <zorder>horizontalLayoutWidget_2</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>1000</width>
- <height>24</height>
+ <width>999</width>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&xit</string>
</property>
</action>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>960</x>
<y>694</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
# Form implementation generated from reading ui file 'qt_rx_window2.ui'
#
-# Created: Sat Jan 2 12:54:51 2010
-# by: PyQt4 UI code generator 4.4.3
+# Created: Tue May 11 21:01:39 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1000, 816)
+ DigitalWindow.resize(1000, 523)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.gridLayout = QtGui.QGridLayout(self.centralwidget)
- self.gridLayout.setObjectName("gridLayout")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
+ self.sinkLayout = QtGui.QHBoxLayout()
+ self.sinkLayout.setObjectName("sinkLayout")
+ self.verticalLayout.addLayout(self.sinkLayout)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.horizontalLayout.setObjectName("horizontalLayout")
self.closeButton.setObjectName("closeButton")
self.verticalLayout_5.addWidget(self.closeButton)
self.horizontalLayout.addLayout(self.verticalLayout_5)
- self.gridLayout.addLayout(self.horizontalLayout, 1, 0, 1, 1)
- self.sinkFrame = QtGui.QFrame(self.centralwidget)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(1)
- sizePolicy.setHeightForWidth(self.sinkFrame.sizePolicy().hasHeightForWidth())
- self.sinkFrame.setSizePolicy(sizePolicy)
- self.sinkFrame.setMinimumSize(QtCore.QSize(800, 500))
- self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
- self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
- self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
- self.horizontalLayout_2.setObjectName("horizontalLayout_2")
- self.sinkLayout = QtGui.QHBoxLayout()
- self.sinkLayout.setObjectName("sinkLayout")
- self.horizontalLayout_2.addLayout(self.sinkLayout)
- self.gridLayout.addWidget(self.sinkFrame, 0, 0, 1, 1)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 24))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1000, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>DigitalWindow</class>
- <widget class="QMainWindow" name="DigitalWindow" >
- <property name="geometry" >
+ <widget class="QMainWindow" name="DigitalWindow">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
- <height>816</height>
+ <height>523</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>MainWindow</string>
</property>
- <widget class="QWidget" name="centralwidget" >
- <layout class="QGridLayout" name="gridLayout" >
- <item row="1" column="0" >
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <property name="sizeConstraint" >
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item>
- <widget class="QGroupBox" name="rxBox" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QGroupBox" name="rxBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>190</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>250</height>
</size>
</property>
- <property name="title" >
+ <property name="title">
<string>Receiver Parameters</string>
</property>
- <layout class="QFormLayout" name="formLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="freqLabel" >
- <property name="text" >
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
<string>Frequency (Hz)</string>
</property>
</widget>
</item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="freqEdit" />
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="freqEdit"/>
</item>
- <item row="1" column="0" >
- <widget class="QLabel" name="gainLabel" >
- <property name="text" >
+ <item row="1" column="0">
+ <widget class="QLabel" name="gainLabel">
+ <property name="text">
<string>Gain (dB)</string>
</property>
</widget>
</item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="gainEdit" />
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="gainEdit"/>
</item>
- <item row="2" column="0" >
- <widget class="QLabel" name="decimLabel" >
- <property name="text" >
+ <item row="2" column="0">
+ <widget class="QLabel" name="decimLabel">
+ <property name="text">
<string>Decimation</string>
</property>
</widget>
</item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="decimEdit" />
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="decimEdit"/>
</item>
- <item row="3" column="0" >
- <widget class="QLabel" name="gainClockLabel" >
- <property name="text" >
+ <item row="3" column="0">
+ <widget class="QLabel" name="gainClockLabel">
+ <property name="text">
<string>Clock Loop Gain</string>
</property>
</widget>
</item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="gainClockEdit" />
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="gainClockEdit"/>
</item>
- <item row="4" column="0" >
- <widget class="QLabel" name="gainPhaseLabel" >
- <property name="text" >
+ <item row="4" column="0">
+ <widget class="QLabel" name="gainPhaseLabel">
+ <property name="text">
<string>Phase Loop Gain</string>
</property>
</widget>
</item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="gainPhaseEdit" />
+ <item row="4" column="1">
+ <widget class="QLineEdit" name="gainPhaseEdit"/>
</item>
- <item row="5" column="1" >
- <widget class="QLineEdit" name="gainFreqEdit" />
+ <item row="5" column="1">
+ <widget class="QLineEdit" name="gainFreqEdit"/>
</item>
- <item row="5" column="0" >
- <widget class="QLabel" name="gainFreqLabel" >
- <property name="text" >
+ <item row="5" column="0">
+ <widget class="QLabel" name="gainFreqLabel">
+ <property name="text">
<string>Freq. Loop Gain</string>
</property>
</widget>
</widget>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QGroupBox" name="rxPacketBox" >
- <property name="enabled" >
+ <widget class="QGroupBox" name="rxPacketBox">
+ <property name="enabled">
<bool>true</bool>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>250</width>
<height>130</height>
</size>
</property>
- <property name="font" >
+ <property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
- <property name="title" >
+ <property name="title">
<string>Received Packet Info</string>
</property>
- <widget class="QLineEdit" name="pktsRcvdEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsRcvdEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>30</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsRcvdLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsRcvdLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Rcvd.</string>
</property>
</widget>
- <widget class="QLineEdit" name="pktsCorrectEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="pktsCorrectEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>60</y>
</rect>
</property>
</widget>
- <widget class="QLabel" name="pktsCorrectLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="pktsCorrectLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>Packets Correct</string>
</property>
</widget>
- <widget class="QLabel" name="perLabel" >
- <property name="geometry" >
+ <widget class="QLabel" name="perLabel">
+ <property name="geometry">
<rect>
<x>10</x>
<y>90</y>
<height>20</height>
</rect>
</property>
- <property name="text" >
+ <property name="text">
<string>PER</string>
</property>
</widget>
- <widget class="QLineEdit" name="perEdit" >
- <property name="geometry" >
+ <widget class="QLineEdit" name="perEdit">
+ <property name="geometry">
<rect>
<x>120</x>
<y>90</y>
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType" >
+ <property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>60</height>
</layout>
</item>
<item>
- <spacer name="horizontalSpacer" >
- <property name="orientation" >
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</spacer>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_5" >
+ <layout class="QVBoxLayout" name="verticalLayout_5">
<item>
- <spacer name="verticalSpacer_3" >
- <property name="orientation" >
+ <spacer name="verticalSpacer_3">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</spacer>
</item>
<item>
- <widget class="QPushButton" name="closeButton" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <widget class="QPushButton" name="closeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>80</width>
<height>30</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Close</string>
</property>
</widget>
</item>
</layout>
</item>
- <item row="0" column="0" >
- <widget class="QFrame" name="sinkFrame" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize" >
- <size>
- <width>800</width>
- <height>500</height>
- </size>
- </property>
- <property name="frameShape" >
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow" >
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2" >
- <item>
- <layout class="QHBoxLayout" name="sinkLayout" />
- </item>
- </layout>
- </widget>
- </item>
</layout>
- <zorder>sinkFrame</zorder>
- <zorder>verticalSpacer</zorder>
</widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1000</width>
- <height>24</height>
+ <height>23</height>
</rect>
</property>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
<string>&File</string>
</property>
- <addaction name="actionExit" />
+ <addaction name="actionExit"/>
</widget>
- <addaction name="menuFile" />
+ <addaction name="menuFile"/>
</widget>
- <widget class="QStatusBar" name="statusbar" />
- <action name="actionExit" >
- <property name="text" >
+ <widget class="QStatusBar" name="statusbar"/>
+ <action name="actionExit">
+ <property name="text">
<string>E&xit</string>
</property>
</action>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>-1</x>
<y>-1</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>617</x>
<y>327</y>
</hint>
<receiver>DigitalWindow</receiver>
<slot>close()</slot>
<hints>
- <hint type="sourcelabel" >
+ <hint type="sourcelabel">
<x>960</x>
<y>694</y>
</hint>
- <hint type="destinationlabel" >
+ <hint type="destinationlabel">
<x>66</x>
<y>561</y>
</hint>
dnl
dnl MAJOR_VERSION Major release generation (2.x, 3.x, etc.)
dnl API_COMPAT API compatibility version (3.2.x, 3.3.x, etc.)
- dnl MINOR_VERSION Minor release version
+ dnl MINOR_VERSION Minor release version (3.3.0, 3.3.1, etc.)
dnl MAINT_VERSION Pure bugfix additions to make maintenance release
dnl
dnl The last two fields can have 'git' instead of a number to indicate
RELEASE=$RELEASE-$GIT_VERSION
fi
else
- dnl This is a numbered reelase.
- dnl Test if minor version is 0, which we don't encode, unless it is also
- dnl a maintenance release
- if test "$MINOR_VERSION" != "0" -o "$MAINT_VERSION" != "0"; then
- dnl 3.3.1
- RELEASE=$RELEASE.$MINOR_VERSION
- if test "$MAINT_VERSION" != "0"; then
- dnl 3.3.0.1, 3.3.1.1
- RELEASE=$RELEASE.$MAINT_VERSION
- fi
- DOCVER=$RELEASE
+ dnl This is a numbered release.
+ RELEASE=$RELEASE.$MINOR_VERSION
+ if test "$MAINT_VERSION" != "0"; then
+ RELEASE=$RELEASE.$MAINT_VERSION
fi
+
+ DOCVER=$RELEASE
fi
fi
export PYTHONPATH
+case "@host_os@" in
+ darwin*)
+ # FIXME: Code for Darwin guessed but not tested
+ # Special Code for executing on Darwin / Mac OS X only
+ if [ "$DYLD_LIBRARY_PATH" = "" ]
+ then
+ DYLD_LIBRARY_PATH=$libbld/.libs
+ else
+ DYLD_LIBRARY_PATH=$libbld/.libs:$DYLD_LIBRARY_PATH
+ fi
+ export DYLD_LIBRARY_PATH
+ ;;
+ cygwin*|win*|mingw*)
+ # Special Code for executing on Win32 variants only
+ if [ "$PATH" = "" ]
+ then
+ PATH=$libbld/.libs
+ else
+ PATH=$libbld/.libs:$PATH
+ fi
+ export PATH
+ ;;
+esac
+
#
# This is the simple part...
# Run everything that matches qa_*.py and return the final result.
MAJOR_VERSION=3
API_COMPAT=3
-MINOR_VERSION=git
-MAINT_VERSION=
+MINOR_VERSION=0-rc0
+MAINT_VERSION=0
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QwtText t(QString("Sample %1, %2 V").arg(p.x(), 0, 'f', 0).arg(p.y(), 0, 'f', 4));
-
+ QwtText t(QString("(%1, %2)").arg(p.x(), 0, 'f', 4).
+ arg(p.y(), 0, 'f', 4));
return t;
}
};
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_numPoints = 1024;
_penSize = 5;
_realDataPoints = new double[_numPoints];
canvas()->setPalette(palette);
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
- //setAxisScale(QwtPlot::xBottom, -1.0, 1.0);
set_xaxis(-2.0, 2.0);
setAxisTitle(QwtPlot::xBottom, "In-phase");
setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
- //setAxisScale(QwtPlot::yLeft, -1.0, 1.0);
set_yaxis(-2.0, 2.0);
setAxisTitle(QwtPlot::yLeft, "Quadrature");
set_yaxis(ymin, ymax);
}
-void ConstellationDisplayPlot::replot(){
-
- const timespec startTime = get_highres_clock();
-
+void ConstellationDisplayPlot::replot()
+{
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
void ConstellationDisplayPlot::PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints)
+ const int64_t numDataPoints,
+ const double timeInterval)
{
- if(numDataPoints > 0){
-
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
_plot_curve->setRawData(_realDataPoints, _imagDataPoints, _numPoints);
}
+
memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double));
memcpy(_imagDataPoints, imagDataPoints, numDataPoints*sizeof(double));
- }
-
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
+ replot();
+
_lastReplot = get_highres_clock();
}
}
void PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints);
+ const int64_t numDataPoints,
+ const double timeInterval);
virtual void replot();
int64_t _numPoints;
int64_t _penSize;
-
- double _displayIntervalTime;
};
#endif /* CONSTELLATION_DISPLAY_PLOT_HPP */
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QString strunits = (GetFrequencyPrecision() == 0) ? "Hz" : "kHz";
- QwtText t(QString("%1 %2, %3 dB").arg(p.x(), 0, 'f',
- GetFrequencyPrecision()).arg(strunits).arg(p.y(), 0, 'f', 2));
-
+ QwtText t(QString("%1 %2, %3 dB").
+ arg(p.x(), 0, 'f', GetFrequencyPrecision()).
+ arg(_unitType.c_str()).arg(p.y(), 0, 'f', 2));
return t;
}
+
+private:
+ std::string _unitType;
};
FrequencyDisplayPlot::FrequencyDisplayPlot(QWidget* parent)
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_useCenterFrequencyFlag = false;
_numPoints = 1024;
palette.setColor(canvas()->backgroundRole(), QColor("white"));
canvas()->setPalette(palette);
- setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0));
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
setAxisTitle(QwtPlot::xBottom, "Frequency (Hz)");
+ setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(0));
_minYAxis = -120;
_maxYAxis = 10;
_upper_intensity_marker = new QwtPlotMarker();
_upper_intensity_marker->setLineStyle(QwtPlotMarker::HLine);
- _upper_intensity_marker->setLinePen(QPen(Qt::green));
+ _upper_intensity_marker->setLinePen(QPen(Qt::green, 0, Qt::DotLine));
_upper_intensity_marker->attach(this);
memset(_dataPoints, 0x0, _numPoints*sizeof(double));
_maxFFTPoints[number] = -280.0;
}
- _resetXAxisPoints();
-
-
// set up peak marker
QwtSymbol symbol;
const QColor c(Qt::darkRed);
_zoomer->setRubberBandPen(c);
_zoomer->setTrackerPen(c);
+
+ // Do this after the zoomer has been built
+ _resetXAxisPoints();
}
FrequencyDisplayPlot::~FrequencyDisplayPlot()
stopFreq = (stopFreq + centerFreq);
}
- _startFrequency = startFreq;
- _stopFrequency = stopFreq;
- _resetXAxisPoints();
-
- double display_units = ceil(log10(units)/2.0);
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
- setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units));
- setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
- ((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
-
- // Load up the new base zoom settings
- _zoomer->setZoomBase();
-
- // Zooms back to the base and clears any other zoom levels
- _zoomer->zoom(0);
+ bool reset = false;
+ if((startFreq != _startFrequency) || (stopFreq != _stopFrequency))
+ reset = true;
+
+ if(stopFreq > startFreq) {
+ _startFrequency = startFreq;
+ _stopFrequency = stopFreq;
+
+ if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
+ double display_units = ceil(log10(units)/2.0);
+ setAxisScaleDraw(QwtPlot::xBottom, new FreqDisplayScaleDraw(display_units));
+ setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
+
+ if(reset)
+ _resetXAxisPoints();
+
+ ((FreqDisplayZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
+ ((FreqDisplayZoomer*)_zoomer)->SetUnitType(strunits);
+ }
+ }
}
void
FrequencyDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
_markerNoiseFloorAmplitude->setYValue(_noiseFloorAmplitude);
// Make sure to take into account the start frequency
_markerPeakAmplitude->setYValue(_peakAmplitude);
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
void
FrequencyDisplayPlot::PlotNewData(const double* dataPoints, const int64_t numDataPoints,
const double noiseFloorAmplitude, const double peakFrequency,
- const double peakAmplitude)
+ const double peakAmplitude, const double timeInterval)
{
- if(numDataPoints > 0){
-
- if(numDataPoints != _numPoints){
+ // Only update plot if there is data and if the time interval has elapsed
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
+ if(numDataPoints != _numPoints) {
_numPoints = numDataPoints;
-
+
delete[] _dataPoints;
delete[] _minFFTPoints;
delete[] _maxFFTPoints;
_fft_plot_curve->setRawData(_xAxisPoints, _dataPoints, _numPoints);
_min_fft_plot_curve->setRawData(_xAxisPoints, _minFFTPoints, _numPoints);
_max_fft_plot_curve->setRawData(_xAxisPoints, _maxFFTPoints, _numPoints);
-
+
_resetXAxisPoints();
ClearMaxData();
ClearMinData();
}
-
+
memcpy(_dataPoints, dataPoints, numDataPoints*sizeof(double));
for(int64_t point = 0; point < numDataPoints; point++){
if(dataPoints[point] < _minFFTPoints[point]){
_peakFrequency = peakFrequency;
_peakAmplitude = peakAmplitude;
- }
+ SetUpperIntensityLevel(_peakAmplitude);
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
+ replot();
+
_lastReplot = get_highres_clock();
}
}
_xAxisPoints[loc] = freqValue;
freqValue += fft_bin_size;
}
+
+ setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+
+ // Set up zoomer base for maximum unzoom x-axis
+ // and reset to maximum unzoom level
+ QwtDoubleRect zbase = _zoomer->zoomBase();
+ zbase.setLeft(_startFrequency);
+ zbase.setRight(_stopFrequency);
+ _zoomer->zoom(zbase);
+ _zoomer->setZoomBase(zbase);
+ _zoomer->zoom(0);
}
void
void PlotNewData(const double* dataPoints, const int64_t numDataPoints,
const double noiseFloorAmplitude, const double peakFrequency,
- const double peakAmplitude);
+ const double peakAmplitude, const double timeInterval);
void ClearMaxData();
void ClearMinData();
timespec _lastReplot;
bool _useCenterFrequencyFlag;
-
- double _displayIntervalTime;
};
#endif /* FREQUENCY_DISPLAY_PLOT_HPP */
timespec_reset(&_lastGUIUpdateTime);
// Draw Blank Display
- UpdateWindow(false, NULL, 0, NULL, 0, NULL, 0, 1.0, get_highres_clock(), true);
+ UpdateWindow(false, NULL, 0, NULL, 0, NULL, 0, get_highres_clock(), true);
// Set up the initial frequency axis settings
SetFrequencyRange(_centerFrequency, _startFrequency, _stopFrequency);
const uint64_t realTimeDomainDataSize,
const float* complexTimeDomainData,
const uint64_t complexTimeDomainDataSize,
- const double timePerFFT,
const timespec timestamp,
const bool lastOfMultipleFFTUpdateFlag)
{
const timespec currentTime = get_highres_clock();
const timespec lastUpdateGUITime = GetLastGUIUpdateTime();
- if((diff_timespec(currentTime, lastUpdateGUITime) > (4*timePerFFT)) &&
+ if((diff_timespec(currentTime, lastUpdateGUITime) > (4*_updateTime)) &&
(GetPendingGUIUpdateEvents() > 0) && !timespec_empty(&lastUpdateGUITime)) {
// Do not update the display if too much data is pending to be displayed
_droppedEntriesCount++;
_realTimeDomainPoints,
_imagTimeDomainPoints,
timeDomainBufferSize,
- timePerFFT, timestamp,
+ timestamp,
repeatDataFlag,
lastOfMultipleFFTUpdateFlag,
currentTime,
_spectrumDisplayForm->SetFrequencyAxis(min, max);
}
+void
+SpectrumGUIClass::SetUpdateTime(double t)
+{
+ _updateTime = t;
+ _spectrumDisplayForm->SetUpdateTime(_updateTime);
+}
+
+
#endif /* SPECTRUM_GUI_CLASS_CPP */
void UpdateWindow(const bool, const std::complex<float>*,
const uint64_t, const float*,
const uint64_t, const float*,
- const uint64_t, const double,
+ const uint64_t,
const timespec, const bool);
float GetPowerValue()const;
void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
+ void SetUpdateTime(double t);
+
protected:
private:
unsigned int _pendingGUIUpdateEventsCount;
int _droppedEntriesCount;
bool _fftBuffersCreatedFlag;
+ double _updateTime;
SpectrumDisplayForm* _spectrumDisplayForm;
#include <qwt_legend.h>
-class TimeDomainDisplayZoomer: public QwtPlotZoomer
+class TimePrecisionClass
{
public:
- TimeDomainDisplayZoomer(QwtPlotCanvas* canvas):QwtPlotZoomer(canvas)
+ TimePrecisionClass(const int timePrecision)
+ {
+ _timePrecision = timePrecision;
+ }
+
+ virtual ~TimePrecisionClass()
+ {
+ }
+
+ virtual unsigned int GetTimePrecision() const
+ {
+ return _timePrecision;
+ }
+
+ virtual void SetTimePrecision(const unsigned int newPrecision)
+ {
+ _timePrecision = newPrecision;
+ }
+protected:
+ unsigned int _timePrecision;
+};
+
+
+class TimeDomainDisplayZoomer: public QwtPlotZoomer, public TimePrecisionClass
+{
+public:
+ TimeDomainDisplayZoomer(QwtPlotCanvas* canvas, const unsigned int timePrecision)
+ : QwtPlotZoomer(canvas),TimePrecisionClass(timePrecision)
{
setTrackerMode(QwtPicker::AlwaysOn);
}
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
- QwtText t(QString("Sample %1, %2 V").arg(p.x(), 0, 'f', 0).arg(p.y(), 0, 'f', 4));
+ QwtText t(QString("%1 %2, %3 V").arg(p.x(), 0, 'f', GetTimePrecision()).
+ arg(_unitType.c_str()).
+ arg(p.y(), 0, 'f', 4));
return t;
}
+
+private:
+ std::string _unitType;
};
-TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent){
+TimeDomainDisplayPlot::TimeDomainDisplayPlot(QWidget* parent):QwtPlot(parent)
+{
timespec_reset(&_lastReplot);
resize(parent->width(), parent->height());
- _displayIntervalTime = (1.0/10.0); // 1/10 of a second between updates
-
_numPoints = 1024;
_realDataPoints = new double[_numPoints];
_imagDataPoints = new double[_numPoints];
_xAxisPoints = new double[_numPoints];
- _zoomer = new TimeDomainDisplayZoomer(canvas());
+ _zoomer = new TimeDomainDisplayZoomer(canvas(), 0);
// Disable polygon clipping
QwtPainter::setDeviceClipping(false);
setAxisScaleEngine(QwtPlot::xBottom, new QwtLinearScaleEngine);
set_xaxis(0, _numPoints);
- setAxisTitle(QwtPlot::xBottom, "Sample Number");
+ setAxisTitle(QwtPlot::xBottom, "Time (sec)");
setAxisScaleEngine(QwtPlot::yLeft, new QwtLinearScaleEngine);
set_yaxis(-2.0, 2.0);
memset(_imagDataPoints, 0x0, _numPoints*sizeof(double));
memset(_xAxisPoints, 0x0, _numPoints*sizeof(double));
+ _sampleRate = 1;
_resetXAxisPoints();
replot();
legendDisplay->setItemMode(QwtLegend::CheckableItem);
insertLegend(legendDisplay);
- connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ), this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) ));
+ connect(this, SIGNAL( legendChecked(QwtPlotItem *, bool ) ),
+ this, SLOT( LegendEntryChecked(QwtPlotItem *, bool ) ));
}
TimeDomainDisplayPlot::~TimeDomainDisplayPlot(){
void TimeDomainDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- differenceTime *= 99.0;
- // Require at least a 10% duty cycle
- if(differenceTime > (1.0/10.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
void TimeDomainDisplayPlot::PlotNewData(const double* realDataPoints,
const double* imagDataPoints,
- const int64_t numDataPoints)
+ const int64_t numDataPoints,
+ const double timeInterval)
{
- if(numDataPoints > 0){
-
+ if((numDataPoints > 0) &&
+ (diff_timespec(get_highres_clock(), _lastReplot) > timeInterval)) {
+
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
_resetXAxisPoints();
}
+
memcpy(_realDataPoints, realDataPoints, numDataPoints*sizeof(double));
memcpy(_imagDataPoints, imagDataPoints, numDataPoints*sizeof(double));
- }
+ replot();
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
- // Only replot the screen if it is visible
- if(isVisible()){
- replot();
- }
_lastReplot = get_highres_clock();
}
}
-void TimeDomainDisplayPlot::SetImaginaryDataVisible(const bool visibleFlag){
+void TimeDomainDisplayPlot::SetImaginaryDataVisible(const bool visibleFlag)
+{
_imag_plot_curve->setVisible(visibleFlag);
}
-void TimeDomainDisplayPlot::_resetXAxisPoints(){
+void TimeDomainDisplayPlot::_resetXAxisPoints()
+{
+ double delt = 1.0/_sampleRate;
for(long loc = 0; loc < _numPoints; loc++){
- _xAxisPoints[loc] = loc;
+ _xAxisPoints[loc] = loc*delt;
}
- setAxisScale(QwtPlot::xBottom, 0, _numPoints);
+ setAxisScale(QwtPlot::xBottom, 0, _numPoints*delt);
+
+ // Set up zoomer base for maximum unzoom x-axis
+ // and reset to maximum unzoom level
+ QwtDoubleRect zbase = _zoomer->zoomBase();
+ zbase.setLeft(0);
+ zbase.setRight(_numPoints*delt);
+ _zoomer->zoom(zbase);
+ _zoomer->setZoomBase(zbase);
+ _zoomer->zoom(0);
}
-void TimeDomainDisplayPlot::LegendEntryChecked(QwtPlotItem* plotItem, bool on){
+void TimeDomainDisplayPlot::LegendEntryChecked(QwtPlotItem* plotItem, bool on)
+{
plotItem->setVisible(!on);
}
+void
+TimeDomainDisplayPlot::SetSampleRate(double sr, double units,
+ const std::string &strunits)
+{
+ double newsr = sr/units;
+ if(newsr != _sampleRate) {
+ _sampleRate = sr/units;
+ _resetXAxisPoints();
+
+ // While we could change the displayed sigfigs based on the unit being
+ // displayed, I think it looks better by just setting it to 4 regardless.
+ //double display_units = ceil(log10(units)/2.0);
+ double display_units = 4;
+ setAxisTitle(QwtPlot::xBottom, QString("Time (%1)").arg(strunits.c_str()));
+ ((TimeDomainDisplayZoomer*)_zoomer)->SetTimePrecision(display_units);
+ ((TimeDomainDisplayZoomer*)_zoomer)->SetUnitType(strunits);
+ }
+}
+
#endif /* TIME_DOMAIN_DISPLAY_PLOT_C */
TimeDomainDisplayPlot(QWidget*);
virtual ~TimeDomainDisplayPlot();
- void PlotNewData(const double* realDataPoints, const double* imagDataPoints, const int64_t numDataPoints);
+ void PlotNewData(const double* realDataPoints, const double* imagDataPoints,
+ const int64_t numDataPoints, const double timeInterval);
void SetImaginaryDataVisible(const bool);
public slots:
void resizeSlot( QSize *s );
+ void SetSampleRate(double sr, double units,
+ const std::string &strunits);
protected slots:
void LegendEntryChecked(QwtPlotItem *plotItem, bool on);
double* _imagDataPoints;
double* _xAxisPoints;
+ double _sampleRate;
+
timespec _lastReplot;
int64_t _numPoints;
-
- double _displayIntervalTime;
};
#endif /* TIME_DOMAIN_DISPLAY_PLOT_HPP */
QwtText label(double value) const
{
- return QString("%1").arg((value + GetCenterFrequency()) / ((GetFrequencyPrecision() == 0) ? 1.0 : 1000.0),
- 0, 'f', GetFrequencyPrecision());
+ return QString("%1").arg(value, 0, 'f', GetFrequencyPrecision());
}
virtual void initiateUpdate()
};
-class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData, public FreqOffsetAndPrecisionClass
+class WaterfallZoomer: public QwtPlotZoomer, public TimeScaleData,
+ public FreqOffsetAndPrecisionClass
{
public:
WaterfallZoomer(QwtPlotCanvas* canvas, const unsigned int freqPrecision)
updateDisplay();
}
+ void SetUnitType(const std::string &type)
+ {
+ _unitType = type;
+ }
+
protected:
virtual QwtText trackerText( const QwtDoublePoint& p ) const
{
timeTm.tm_mday, timeTm.tm_hour, timeTm.tm_min,
timeTm.tm_sec, lineTime.tv_nsec/1000000));
- QwtText t(QString("%1 %2, %3").arg((p.x() + GetCenterFrequency()) / ((GetFrequencyPrecision() == 0) ? 1.0 : 1000.0), 0, 'f', GetFrequencyPrecision()).arg( (GetFrequencyPrecision() == 0) ? "Hz" : "kHz").arg(yLabel));
-
+ QwtText t(QString("%1 %2, %3").
+ arg(p.x(), 0, 'f', GetFrequencyPrecision()).
+ arg(_unitType.c_str()).arg(yLabel));
return t;
}
+
+private:
+ std::string _unitType;
};
resize(parent->width(), parent->height());
_numPoints = 1024;
- _displayIntervalTime = (1.0/5.0); // 1/5 of a second between updates
-
_waterfallData = new WaterfallData(_startFrequency, _stopFrequency, _numPoints, 200);
QPalette palette;
WaterfallDisplayPlot::~WaterfallDisplayPlot()
{
delete _waterfallData;
+ delete d_spectrogram;
}
void
_waterfallData->ResizeData(_startFrequency, _stopFrequency, _numPoints);
_waterfallData->Reset();
+ setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+
// Load up the new base zoom settings
QwtDoubleRect newSize = _zoomer->zoomBase();
newSize.setLeft(_startFrequency);
double stopFreq = constStopFreq / units;
double centerFreq = constCenterFreq / units;
- if(stopFreq > startFreq) {
- _startFrequency = 1000*startFreq;
- _stopFrequency = 1000*stopFreq;
+ _useCenterFrequencyFlag = useCenterFrequencyFlag;
- setAxisScale(QwtPlot::xBottom, _startFrequency, _stopFrequency);
+ if(_useCenterFrequencyFlag){
+ startFreq = (startFreq + centerFreq);
+ stopFreq = (stopFreq + centerFreq);
+ }
- if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
- WaterfallFreqDisplayScaleDraw* freqScale = ((WaterfallFreqDisplayScaleDraw*)axisScaleDraw(QwtPlot::xBottom));
- freqScale->SetCenterFrequency(centerFreq);
- ((WaterfallZoomer*)_zoomer)->SetCenterFrequency(centerFreq);
+ bool reset = false;
+ if((startFreq != _startFrequency) || (stopFreq != _stopFrequency))
+ reset = true;
- freqScale->SetFrequencyPrecision( 2 );
- ((WaterfallZoomer*)_zoomer)->SetFrequencyPrecision( 2 );
+ if(stopFreq > startFreq) {
+ _startFrequency = startFreq;
+ _stopFrequency = stopFreq;
+
+ if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (_zoomer != NULL)){
+ double display_units = ceil(log10(units)/2.0);
+ setAxisScaleDraw(QwtPlot::xBottom, new WaterfallFreqDisplayScaleDraw(display_units));
setAxisTitle(QwtPlot::xBottom, QString("Frequency (%1)").arg(strunits.c_str()));
- }
- Reset();
+ if(reset) {
+ Reset();
+ }
- // Only replot if screen is visible
- if(isVisible()){
- replot();
+ ((WaterfallZoomer*)_zoomer)->SetFrequencyPrecision(display_units);
+ ((WaterfallZoomer*)_zoomer)->SetUnitType(strunits);
}
}
}
void
WaterfallDisplayPlot::PlotNewData(const double* dataPoints,
- const int64_t numDataPoints,
- const double timePerFFT,
- const timespec timestamp,
- const int droppedFrames)
+ const int64_t numDataPoints,
+ const double timePerFFT,
+ const timespec timestamp,
+ const int droppedFrames)
{
if(numDataPoints > 0){
if(numDataPoints != _numPoints){
_numPoints = numDataPoints;
-
+
Reset();
-
+
d_spectrogram->invalidateCache();
d_spectrogram->itemChanged();
-
+
if(isVisible()){
replot();
}
-
+
_lastReplot = get_highres_clock();
}
- _waterfallData->addFFTData(dataPoints, numDataPoints, droppedFrames);
- _waterfallData->IncrementNumLinesToUpdate();
-
- QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
- timeScale->SetSecondsPerLine(timePerFFT);
- timeScale->SetZeroTime(timestamp);
-
- ((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT);
- ((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp);
- }
-
- // Allow at least a 50% duty cycle
- if(diff_timespec(get_highres_clock(), _lastReplot) > _displayIntervalTime){
-
- d_spectrogram->invalidateCache();
- d_spectrogram->itemChanged();
-
- // Only update when window is visible
- if(isVisible()){
+ if(diff_timespec(get_highres_clock(), _lastReplot) > timePerFFT) {
+ //FIXME: We may want to average the data between these updates to smooth display
+ _waterfallData->addFFTData(dataPoints, numDataPoints, droppedFrames);
+ _waterfallData->IncrementNumLinesToUpdate();
+
+ QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
+ timeScale->SetSecondsPerLine(timePerFFT);
+ timeScale->SetZeroTime(timestamp);
+
+ ((WaterfallZoomer*)_zoomer)->SetSecondsPerLine(timePerFFT);
+ ((WaterfallZoomer*)_zoomer)->SetZeroTime(timestamp);
+
+ d_spectrogram->invalidateCache();
+ d_spectrogram->itemChanged();
+
replot();
- }
- _lastReplot = get_highres_clock();
+ _lastReplot = get_highres_clock();
+ }
}
}
void
WaterfallDisplayPlot::replot()
{
- const timespec startTime = get_highres_clock();
-
QwtTimeScaleDraw* timeScale = (QwtTimeScaleDraw*)axisScaleDraw(QwtPlot::yLeft);
timeScale->initiateUpdate();
}
QwtPlot::replot();
-
- double differenceTime = (diff_timespec(get_highres_clock(), startTime));
-
- // Require at least a 5% duty cycle
- differenceTime *= 19.0;
- if(differenceTime > (1.0/5.0)){
- _displayIntervalTime = differenceTime;
- }
}
void
timespec _lastReplot;
- int64_t _numPoints;
+ bool _useCenterFrequencyFlag;
- double _displayIntervalTime;
+ int64_t _numPoints;
int _intensityColorMapType;
QColor _userDefinedLowIntensityColor;
qtgui_sink_c::~qtgui_sink_c()
{
- delete d_object;
+ delete d_main_gui;
delete [] d_residbuf;
delete d_fft;
}
d_plotconst,
opengl);
+ // initialize update time to 10 times a second
+ set_update_time(0.1);
+
d_object = new qtgui_obj(d_qApplication);
qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
}
d_main_gui->SetFrequencyAxis(min, max);
}
+void
+qtgui_sink_c::set_update_time(double t)
+{
+ d_update_time = t;
+ d_main_gui->SetUpdateTime(d_update_time);
+}
+
void
qtgui_sink_c::fft(const gr_complex *data_in, int size)
{
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
NULL, 0, (float*)d_residbuf, d_fftsize,
- 1.0/4.0, currentTime, true);
+ currentTime, true);
}
// Otherwise, copy what we received into the residbuf for next time
else {
bool d_plotfreq, d_plotwaterfall, d_plotwaterfall3d, d_plottime, d_plotconst;
+ double d_update_time;
+
QWidget *d_parent;
SpectrumGUIClass *d_main_gui;
void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
+ void set_update_time(double t);
+
QApplication *d_qApplication;
qtgui_obj *d_object;
qtgui_sink_f::~qtgui_sink_f()
{
- delete d_object;
+ delete d_main_gui;
delete [] d_residbuf;
delete d_fft;
}
d_plotconst,
opengl);
+ // initialize update time to 10 times a second
+ set_update_time(0.1);
+
d_object = new qtgui_obj(d_qApplication);
qApp->postEvent(d_object, new qtgui_event(&d_pmutex));
}
d_main_gui->SetFrequencyAxis(min, max);
}
+void
+qtgui_sink_f::set_update_time(double t)
+{
+ d_update_time = t;
+ d_main_gui->SetUpdateTime(d_update_time);
+}
+
void
qtgui_sink_f::fft(const float *data_in, int size)
{
d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize,
(float*)d_residbuf, d_fftsize, NULL, 0,
- 1.0/4.0, currentTime, true);
+ currentTime, true);
}
// Otherwise, copy what we received into the residbuf for next time
else {
bool d_plotfreq, d_plotwaterfall, d_plotwaterfall3d, d_plottime, d_plotconst;
+ double d_update_time;
+
QWidget *d_parent;
SpectrumGUIClass *d_main_gui;
void set_constellation_pen_size(int size);
void set_frequency_axis(double min, double max);
+ void set_update_time(double t);
+
QApplication *d_qApplication;
qtgui_obj *d_object;
const double* realTimeDomainPoints,
const double* imagTimeDomainPoints,
const uint64_t numTimeDomainDataPoints,
- const double timePerFFT,
const timespec dataTimestamp,
const bool repeatDataFlag,
const bool lastOfMultipleUpdateFlag,
const int droppedFFTFrames)
: QEvent(QEvent::Type(10005))
{
- _numFFTDataPoints = numFFTDataPoints;
- if(_numFFTDataPoints < 1){
+ if(numFFTDataPoints < 1) {
_numFFTDataPoints = 1;
}
+ else {
+ _numFFTDataPoints = numFFTDataPoints;
+ }
- _numTimeDomainDataPoints = numTimeDomainDataPoints;
- if(_numTimeDomainDataPoints < 1){
+ if(numTimeDomainDataPoints < 1) {
_numTimeDomainDataPoints = 1;
}
+ else {
+ _numTimeDomainDataPoints = numTimeDomainDataPoints;
+ }
_fftPoints = new std::complex<float>[_numFFTDataPoints];
_fftPoints[0] = std::complex<float>(0,0);
_realDataTimeDomainPoints = new double[_numTimeDomainDataPoints];
memset(_realDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double));
- if(numTimeDomainDataPoints > 0){
+ if(numTimeDomainDataPoints > 0) {
memcpy(_realDataTimeDomainPoints, realTimeDomainPoints,
numTimeDomainDataPoints*sizeof(double));
}
_imagDataTimeDomainPoints = new double[_numTimeDomainDataPoints];
memset(_imagDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double));
- if(numTimeDomainDataPoints > 0){
+ if(numTimeDomainDataPoints > 0) {
memcpy(_imagDataTimeDomainPoints, imagTimeDomainPoints,
numTimeDomainDataPoints*sizeof(double));
}
_dataTimestamp = dataTimestamp;
- _timePerFFT = timePerFFT;
_repeatDataFlag = repeatDataFlag;
_lastOfMultipleUpdateFlag = lastOfMultipleUpdateFlag;
_eventGeneratedTimestamp = generatedTimestamp;
_droppedFFTFrames = droppedFFTFrames;
}
-SpectrumUpdateEvent::~SpectrumUpdateEvent(){
+SpectrumUpdateEvent::~SpectrumUpdateEvent()
+{
delete[] _fftPoints;
delete[] _realDataTimeDomainPoints;
delete[] _imagDataTimeDomainPoints;
return _numTimeDomainDataPoints;
}
-double
-SpectrumUpdateEvent::getTimePerFFT() const
-{
- return _timePerFFT;
-}
-
timespec
SpectrumUpdateEvent::getDataTimestamp() const
{
class SpectrumUpdateEvent:public QEvent{
public:
- SpectrumUpdateEvent(const std::complex<float>* fftPoints, const uint64_t numFFTDataPoints, const double* realTimeDomainPoints, const double* imagTimeDomainPoints, const uint64_t numTimeDomainDataPoints, const double timePerFFT, const timespec dataTimestamp, const bool repeatDataFlag, const bool lastOfMultipleUpdateFlag, const timespec generatedTimestamp, const int droppedFFTFrames);
+ SpectrumUpdateEvent(const std::complex<float>* fftPoints,
+ const uint64_t numFFTDataPoints,
+ const double* realTimeDomainPoints,
+ const double* imagTimeDomainPoints,
+ const uint64_t numTimeDomainDataPoints,
+ const timespec dataTimestamp,
+ const bool repeatDataFlag,
+ const bool lastOfMultipleUpdateFlag,
+ const timespec generatedTimestamp,
+ const int droppedFFTFrames);
+
~SpectrumUpdateEvent();
- const std::complex<float>* getFFTPoints()const;
- const double* getRealTimeDomainPoints()const;
- const double* getImagTimeDomainPoints()const;
- uint64_t getNumFFTDataPoints()const;
- uint64_t getNumTimeDomainDataPoints()const;
- double getTimePerFFT()const;
- timespec getDataTimestamp()const;
- bool getRepeatDataFlag()const;
- bool getLastOfMultipleUpdateFlag()const;
- timespec getEventGeneratedTimestamp()const;
- int getDroppedFFTFrames()const;
+
+ const std::complex<float>* getFFTPoints() const;
+ const double* getRealTimeDomainPoints() const;
+ const double* getImagTimeDomainPoints() const;
+ uint64_t getNumFFTDataPoints() const;
+ uint64_t getNumTimeDomainDataPoints() const;
+ timespec getDataTimestamp() const;
+ bool getRepeatDataFlag() const;
+ bool getLastOfMultipleUpdateFlag() const;
+ timespec getEventGeneratedTimestamp() const;
+ int getDroppedFFTFrames() const;
protected:
double* _imagDataTimeDomainPoints;
uint64_t _numFFTDataPoints;
uint64_t _numTimeDomainDataPoints;
- double _timePerFFT;
timespec _dataTimestamp;
bool _repeatDataFlag;
bool _lastOfMultipleUpdateFlag;
#include <TimeDomainDisplayPlot.h>
#include <ConstellationDisplayPlot.h>
#include <QValidator>
+#include <QTimer>
#include <vector>
class SpectrumDisplayForm : public QWidget, public Ui::SpectrumDisplayForm
void MaxHoldResetBtn_clicked();
void TabChanged(int index);
- void PowerLineEdit_textChanged( const QString& valueString );
void SetFrequencyRange( const double newCenterFrequency,
const double newStartFrequency,
const double newStopFrequency );
double ymin, double ymax);
void SetConstellationPenSize(int size);
void SetFrequencyAxis(double min, double max);
+ void SetUpdateTime(double t);
private slots:
void newFrequencyData( const SpectrumUpdateEvent* );
+ void UpdateGuiTimer();
protected:
int d_plot_waterfall3d;
int d_plot_time;
int d_plot_constellation;
+
+ QTimer *displayTimer;
+ double d_update_time;
};
#endif /* SPECTRUM_DISPLAY_FORM_H */
<rect>
<x>0</x>
<y>0</y>
- <width>657</width>
+ <width>712</width>
<height>543</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>400</width>
- <height>332</height>
+ <height>350</height>
</size>
</property>
<property name="sizeIncrement">
</property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QLabel" name="PowerLabel">
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>Power</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
<item row="1" column="1">
<widget class="QPushButton" name="MaxHoldResetBtn">
<property name="sizePolicy">
</property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="1" column="3">
<widget class="QLabel" name="AvgLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
</property>
</widget>
</item>
- <item row="2" column="4">
- <widget class="QSpinBox" name="AvgLineEdit"/>
- </item>
<item row="2" column="3">
- <widget class="QLineEdit" name="PowerLineEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>50</width>
- <height>0</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>50</width>
- <height>16777215</height>
- </size>
- </property>
- <property name="text">
- <string>1</string>
- </property>
- </widget>
+ <widget class="QSpinBox" name="AvgLineEdit"/>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer_2">
</hint>
</hints>
</connection>
- <connection>
- <sender>PowerLineEdit</sender>
- <signal>textChanged(QString)</signal>
- <receiver>SpectrumDisplayForm</receiver>
- <slot>PowerLineEdit_textChanged(QString)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>482</x>
- <y>344</y>
- </hint>
- <hint type="destinationlabel">
- <x>20</x>
- <y>20</y>
- </hint>
- </hints>
- </connection>
<connection>
<sender>WindowComboBox</sender>
<signal>activated(int)</signal>
# Wrap the pointer as a PyQt SIP object
# This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
- self.main_box = dialog_box(pyWin, self.ctrl_win)
+ self.main_box = dialog_box(self.pyWin, self.ctrl_win)
self.main_box.show()
# Wrap the pointer as a PyQt SIP object
# This can now be manipulated as a PyQt4.QtGui.QWidget
- pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+ self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
- self.main_box = dialog_box(pyWin, self.ctrl_win)
+ self.main_box = dialog_box(self.pyWin, self.ctrl_win)
self.main_box.show()
self.qapp = QtGui.QApplication(sys.argv)
- self._sample_rate = 200e3
+ self._sample_rate = 2000e3
self.sps = 2
self.excess_bw = 0.35
self.to = 1.0
self.channel = gr.channel_model(noise, self.fo, self.to)
- self.thr = gr.throttle(gr.sizeof_char, 10*fftsize)
- self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1,
+ self.thr = gr.throttle(gr.sizeof_char, self._sample_rate)
+ self.snk_tx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+ 0, self._sample_rate*self.sps,
"Tx", True, True, False, True, True)
- self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS, 0, 1,
+ self.snk_rx = qtgui.sink_c(fftsize, gr.firdes.WIN_BLACKMAN_hARRIS,
+ 0, self._sample_rate,
"Rx", True, True, False, True, True)
self.connect(self.src, self.thr, self.mod, self.channel, self.snk_tx)
# Form implementation generated from reading ui file 'qt_digital_window.ui'
#
-# Created: Thu Jun 18 07:57:58 2009
-# by: PyQt4 UI code generator 4.4.3
+# Created: Sat May 1 20:14:02 2010
+# by: PyQt4 UI code generator 4.6.1
#
# WARNING! All changes made in this file will be lost!
class Ui_DigitalWindow(object):
def setupUi(self, DigitalWindow):
DigitalWindow.setObjectName("DigitalWindow")
- DigitalWindow.resize(1236, 739)
+ DigitalWindow.resize(1236, 741)
self.centralwidget = QtGui.QWidget(DigitalWindow)
self.centralwidget.setObjectName("centralwidget")
- self.closeButton = QtGui.QPushButton(self.centralwidget)
- self.closeButton.setGeometry(QtCore.QRect(1120, 650, 101, 31))
- self.closeButton.setObjectName("closeButton")
+ self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+ self.verticalLayout.setObjectName("verticalLayout")
self.sinkFrame = QtGui.QFrame(self.centralwidget)
- self.sinkFrame.setGeometry(QtCore.QRect(10, 10, 1221, 501))
+ self.sinkFrame.setMinimumSize(QtCore.QSize(0, 550))
self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
self.sinkFrame.setObjectName("sinkFrame")
- self.horizontalLayoutWidget = QtGui.QWidget(self.sinkFrame)
- self.horizontalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 1201, 481))
- self.horizontalLayoutWidget.setObjectName("horizontalLayoutWidget")
- self.sinkLayout = QtGui.QHBoxLayout(self.horizontalLayoutWidget)
+ self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
+ self.horizontalLayout_2.setObjectName("horizontalLayout_2")
+ self.sinkLayout = QtGui.QHBoxLayout()
self.sinkLayout.setObjectName("sinkLayout")
- self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
- self.channelModeBox.setGeometry(QtCore.QRect(290, 520, 291, 161))
- self.channelModeBox.setObjectName("channelModeBox")
- self.timeLabel = QtGui.QLabel(self.channelModeBox)
- self.timeLabel.setGeometry(QtCore.QRect(10, 90, 101, 17))
- self.timeLabel.setObjectName("timeLabel")
- self.timeEdit = QtGui.QLineEdit(self.channelModeBox)
- self.timeEdit.setGeometry(QtCore.QRect(160, 90, 113, 23))
- self.timeEdit.setObjectName("timeEdit")
- self.snrEdit = QtGui.QLineEdit(self.channelModeBox)
- self.snrEdit.setGeometry(QtCore.QRect(160, 30, 113, 23))
- self.snrEdit.setObjectName("snrEdit")
- self.snrLabel = QtGui.QLabel(self.channelModeBox)
- self.snrLabel.setGeometry(QtCore.QRect(10, 30, 111, 20))
- self.snrLabel.setObjectName("snrLabel")
- self.freqEdit = QtGui.QLineEdit(self.channelModeBox)
- self.freqEdit.setGeometry(QtCore.QRect(160, 60, 113, 23))
- self.freqEdit.setObjectName("freqEdit")
- self.freqLabel = QtGui.QLabel(self.channelModeBox)
- self.freqLabel.setGeometry(QtCore.QRect(10, 60, 141, 17))
- self.freqLabel.setObjectName("freqLabel")
- self.rxBox = QtGui.QGroupBox(self.centralwidget)
- self.rxBox.setGeometry(QtCore.QRect(590, 520, 251, 161))
- self.rxBox.setObjectName("rxBox")
- self.gainMuEdit = QtGui.QLineEdit(self.rxBox)
- self.gainMuEdit.setGeometry(QtCore.QRect(120, 30, 113, 23))
- self.gainMuEdit.setObjectName("gainMuEdit")
- self.gainMuLabel = QtGui.QLabel(self.rxBox)
- self.gainMuLabel.setGeometry(QtCore.QRect(10, 30, 111, 20))
- self.gainMuLabel.setObjectName("gainMuLabel")
- self.alphaEdit = QtGui.QLineEdit(self.rxBox)
- self.alphaEdit.setGeometry(QtCore.QRect(120, 60, 113, 23))
- self.alphaEdit.setObjectName("alphaEdit")
- self.alphaLabel = QtGui.QLabel(self.rxBox)
- self.alphaLabel.setGeometry(QtCore.QRect(10, 60, 111, 20))
- self.alphaLabel.setObjectName("alphaLabel")
+ self.horizontalLayout_2.addLayout(self.sinkLayout)
+ self.verticalLayout.addWidget(self.sinkFrame)
+ self.horizontalLayout = QtGui.QHBoxLayout()
+ self.horizontalLayout.setObjectName("horizontalLayout")
self.sysBox = QtGui.QGroupBox(self.centralwidget)
- self.sysBox.setGeometry(QtCore.QRect(20, 520, 261, 161))
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
+ self.sysBox.setSizePolicy(sizePolicy)
+ self.sysBox.setMinimumSize(QtCore.QSize(0, 0))
+ self.sysBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.sysBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.sysBox.setObjectName("sysBox")
+ self.gridLayout_2 = QtGui.QGridLayout(self.sysBox)
+ self.gridLayout_2.setObjectName("gridLayout_2")
self.sampleRateEdit = QtGui.QLineEdit(self.sysBox)
- self.sampleRateEdit.setGeometry(QtCore.QRect(140, 30, 113, 23))
+ self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 16777215))
self.sampleRateEdit.setObjectName("sampleRateEdit")
+ self.gridLayout_2.addWidget(self.sampleRateEdit, 0, 3, 1, 1)
self.sampleRateLabel = QtGui.QLabel(self.sysBox)
- self.sampleRateLabel.setGeometry(QtCore.QRect(10, 30, 121, 20))
self.sampleRateLabel.setObjectName("sampleRateLabel")
+ self.gridLayout_2.addWidget(self.sampleRateLabel, 0, 2, 1, 1)
+ self.horizontalLayout.addWidget(self.sysBox)
+ self.rxBox = QtGui.QGroupBox(self.centralwidget)
+ self.rxBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.rxBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.rxBox.setObjectName("rxBox")
+ self.gridLayout_3 = QtGui.QGridLayout(self.rxBox)
+ self.gridLayout_3.setObjectName("gridLayout_3")
+ self.alphaLabel = QtGui.QLabel(self.rxBox)
+ self.alphaLabel.setObjectName("alphaLabel")
+ self.gridLayout_3.addWidget(self.alphaLabel, 1, 0, 1, 1)
+ self.alphaEdit = QtGui.QLineEdit(self.rxBox)
+ self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.alphaEdit.setObjectName("alphaEdit")
+ self.gridLayout_3.addWidget(self.alphaEdit, 1, 1, 1, 1)
+ self.gainMuLabel = QtGui.QLabel(self.rxBox)
+ self.gainMuLabel.setObjectName("gainMuLabel")
+ self.gridLayout_3.addWidget(self.gainMuLabel, 0, 0, 1, 1)
+ self.gainMuEdit = QtGui.QLineEdit(self.rxBox)
+ self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.gainMuEdit.setObjectName("gainMuEdit")
+ self.gridLayout_3.addWidget(self.gainMuEdit, 0, 1, 1, 1)
+ self.horizontalLayout.addWidget(self.rxBox)
+ self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
+ self.channelModeBox.setMaximumSize(QtCore.QSize(16777215, 120))
+ self.channelModeBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+ self.channelModeBox.setObjectName("channelModeBox")
+ self.gridLayout = QtGui.QGridLayout(self.channelModeBox)
+ self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
+ self.gridLayout.setObjectName("gridLayout")
+ self.snrLabel = QtGui.QLabel(self.channelModeBox)
+ self.snrLabel.setObjectName("snrLabel")
+ self.gridLayout.addWidget(self.snrLabel, 0, 1, 1, 1)
+ self.snrEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.snrEdit.setObjectName("snrEdit")
+ self.gridLayout.addWidget(self.snrEdit, 0, 2, 1, 1)
+ self.freqLabel = QtGui.QLabel(self.channelModeBox)
+ self.freqLabel.setObjectName("freqLabel")
+ self.gridLayout.addWidget(self.freqLabel, 1, 1, 1, 1)
+ self.freqEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.freqEdit.setObjectName("freqEdit")
+ self.gridLayout.addWidget(self.freqEdit, 1, 2, 1, 1)
+ self.timeLabel = QtGui.QLabel(self.channelModeBox)
+ self.timeLabel.setObjectName("timeLabel")
+ self.gridLayout.addWidget(self.timeLabel, 2, 1, 1, 1)
+ self.timeEdit = QtGui.QLineEdit(self.channelModeBox)
+ self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+ self.timeEdit.setObjectName("timeEdit")
+ self.gridLayout.addWidget(self.timeEdit, 2, 2, 1, 1)
+ self.horizontalLayout.addWidget(self.channelModeBox)
+ spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout.addItem(spacerItem)
+ self.verticalLayout_2 = QtGui.QVBoxLayout()
+ self.verticalLayout_2.setObjectName("verticalLayout_2")
+ spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.verticalLayout_2.addItem(spacerItem1)
self.pauseButton = QtGui.QPushButton(self.centralwidget)
- self.pauseButton.setGeometry(QtCore.QRect(1120, 520, 101, 31))
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth())
+ self.pauseButton.setSizePolicy(sizePolicy)
+ self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
self.pauseButton.setObjectName("pauseButton")
+ self.verticalLayout_2.addWidget(self.pauseButton)
+ self.closeButton = QtGui.QPushButton(self.centralwidget)
+ self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+ self.closeButton.setObjectName("closeButton")
+ self.verticalLayout_2.addWidget(self.closeButton)
+ self.horizontalLayout.addLayout(self.verticalLayout_2)
+ self.verticalLayout.addLayout(self.horizontalLayout)
DigitalWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(DigitalWindow)
- self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 25))
+ self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 23))
self.menubar.setObjectName("menubar")
self.menuFile = QtGui.QMenu(self.menubar)
self.menuFile.setObjectName("menuFile")
QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close)
QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close)
QtCore.QMetaObject.connectSlotsByName(DigitalWindow)
- DigitalWindow.setTabOrder(self.closeButton, self.snrEdit)
DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit)
DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit)
def retranslateUi(self, DigitalWindow):
DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
- self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", 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.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
+ self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", 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.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
- self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
- self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", 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.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", 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.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
<x>0</x>
<y>0</y>
<width>1236</width>
- <height>739</height>
+ <height>741</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
- <widget class="QPushButton" name="closeButton">
- <property name="geometry">
- <rect>
- <x>1120</x>
- <y>650</y>
- <width>101</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>Close</string>
- </property>
- </widget>
- <widget class="QFrame" name="sinkFrame">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>1221</width>
- <height>501</height>
- </rect>
- </property>
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <widget class="QWidget" name="horizontalLayoutWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>10</y>
- <width>1201</width>
- <height>481</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="sinkLayout"/>
- </widget>
- </widget>
- <widget class="QGroupBox" name="channelModeBox">
- <property name="geometry">
- <rect>
- <x>290</x>
- <y>520</y>
- <width>291</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>Channel Model Parameters</string>
- </property>
- <widget class="QLabel" name="timeLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>90</y>
- <width>101</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Timing Offset</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="timeEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>90</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLineEdit" name="snrEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="snrLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>SNR (dB)</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="freqEdit">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>60</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="freqLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>141</width>
- <height>17</height>
- </rect>
- </property>
- <property name="text">
- <string>Frequency Offset (Hz)</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="rxBox">
- <property name="geometry">
- <rect>
- <x>590</x>
- <y>520</y>
- <width>251</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>Receiver Parameters</string>
- </property>
- <widget class="QLineEdit" name="gainMuEdit">
- <property name="geometry">
- <rect>
- <x>120</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="gainMuLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Gain mu</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="alphaEdit">
- <property name="geometry">
- <rect>
- <x>120</x>
- <y>60</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="alphaLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>60</y>
- <width>111</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Alpha</string>
- </property>
- </widget>
- </widget>
- <widget class="QGroupBox" name="sysBox">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>520</y>
- <width>261</width>
- <height>161</height>
- </rect>
- </property>
- <property name="title">
- <string>System Parameters</string>
- </property>
- <widget class="QLineEdit" name="sampleRateEdit">
- <property name="geometry">
- <rect>
- <x>140</x>
- <y>30</y>
- <width>113</width>
- <height>23</height>
- </rect>
- </property>
- </widget>
- <widget class="QLabel" name="sampleRateLabel">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>30</y>
- <width>121</width>
- <height>20</height>
- </rect>
- </property>
- <property name="text">
- <string>Sample Rate (sps)</string>
- </property>
- </widget>
- </widget>
- <widget class="QPushButton" name="pauseButton">
- <property name="geometry">
- <rect>
- <x>1120</x>
- <y>520</y>
- <width>101</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>Pause</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QFrame" name="sinkFrame">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>550</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <layout class="QHBoxLayout" name="sinkLayout"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QGroupBox" name="sysBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>System Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="3">
+ <widget class="QLineEdit" name="sampleRateEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="sampleRateLabel">
+ <property name="text">
+ <string>Sample Rate (sps)</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="rxBox">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Receiver Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="1" column="0">
+ <widget class="QLabel" name="alphaLabel">
+ <property name="text">
+ <string>Alpha</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="alphaEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="gainMuLabel">
+ <property name="text">
+ <string>Gain mu</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLineEdit" name="gainMuEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="channelModeBox">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>120</height>
+ </size>
+ </property>
+ <property name="title">
+ <string>Channel Model Parameters</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetMinimumSize</enum>
+ </property>
+ <item row="0" column="1">
+ <widget class="QLabel" name="snrLabel">
+ <property name="text">
+ <string>SNR (dB)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLineEdit" name="snrEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="freqLabel">
+ <property name="text">
+ <string>Frequency Offset (Hz)</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="freqEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="timeLabel">
+ <property name="text">
+ <string>Timing Offset</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QLineEdit" name="timeEdit">
+ <property name="maximumSize">
+ <size>
+ <width>100</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pauseButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Pause</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="closeButton">
+ <property name="maximumSize">
+ <size>
+ <width>80</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Close</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<x>0</x>
<y>0</y>
<width>1236</width>
- <height>25</height>
+ <height>23</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
</action>
</widget>
<tabstops>
- <tabstop>closeButton</tabstop>
<tabstop>snrEdit</tabstop>
<tabstop>freqEdit</tabstop>
<tabstop>timeEdit</tabstop>
help="select Ethernet interface, default is eth0")
parser.add_option("-m", "--mac-addr", type="string", default="",
help="select USRP by MAC address, default is auto-select")
- parser.add_option("-W", "--bw", type="float", default=1e6,
+ parser.add_option("-W", "--bw", type="eng_float", default=1e6,
help="set bandwidth of receiver [default=%default]")
- parser.add_option("-f", "--freq", type="eng_float", default=None,
+ parser.add_option("-f", "--freq", type="eng_float", default=2412e6,
help="set frequency to FREQ", metavar="FREQ")
parser.add_option("-g", "--gain", type="eng_float", default=None,
help="set gain in dB (default is midpoint)")
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
AUTORANGE_KEY = 'autorange'
AVERAGE_KEY = 'average'
AVG_ALPHA_KEY = 'avg_alpha'
+USE_PERSISTENCE_KEY = 'use_persistence'
+PERSIST_ALPHA_KEY = 'persist_alpha'
BASEBAND_FREQ_KEY = 'baseband_freq'
BETA_KEY = 'beta'
COLOR_MODE_KEY = 'color_mode'
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
##################################################
SLIDER_STEPS = 100
AVG_ALPHA_MIN_EXP, AVG_ALPHA_MAX_EXP = -3, 0
+PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
DEFAULT_WIN_SIZE = (600, 300)
DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'fft_rate', 30)
DB_DIV_MIN, DB_DIV_MAX = 1, 20
for widget in (avg_alpha_text, avg_alpha_slider):
parent.subscribe(AVERAGE_KEY, widget.Enable)
widget.Enable(parent[AVERAGE_KEY])
+ parent.subscribe(AVERAGE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[AVERAGE_KEY])
+
+ parent.subscribe(AVERAGE_KEY, self._update_layout)
+
+ forms.check_box(
+ sizer=options_box, parent=self, label='Persistence',
+ ps=parent, key=USE_PERSISTENCE_KEY,
+ )
+ #static text and slider for persist alpha
+ persist_alpha_text = forms.static_text(
+ sizer=options_box, parent=self, label='Persist Alpha',
+ converter=forms.float_converter(lambda x: '%.4f'%x),
+ ps=parent, key=PERSIST_ALPHA_KEY, width=50,
+ )
+ persist_alpha_slider = forms.log_slider(
+ sizer=options_box, parent=self,
+ min_exp=PERSIST_ALPHA_MIN_EXP,
+ max_exp=PERSIST_ALPHA_MAX_EXP,
+ num_steps=SLIDER_STEPS,
+ ps=parent, key=PERSIST_ALPHA_KEY,
+ )
+ for widget in (persist_alpha_text, persist_alpha_slider):
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
+ widget.Enable(parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
+
#trace menu
for trace in TRACES:
trace_box = wx.BoxSizer(wx.HORIZONTAL)
)
#set sizer
self.SetSizerAndFit(control_box)
+
#mouse wheel event
def on_mouse_wheel(event):
if event.GetWheelRotation() < 0: self._on_incr_ref_level(event)
self.parent[Y_PER_DIV_KEY] = min(DB_DIV_MAX, common.get_clean_incr(self.parent[Y_PER_DIV_KEY]))
def _on_decr_db_div(self, event):
self.parent[Y_PER_DIV_KEY] = max(DB_DIV_MIN, common.get_clean_decr(self.parent[Y_PER_DIV_KEY]))
+ ##################################################
+ # subscriber handlers
+ ##################################################
+ def _update_layout(self,key):
+ # Just ignore the key value we get
+ # we only need to now that the visability or size of something has changed
+ self.parent.Layout()
+ #self.parent.Fit()
##################################################
# FFT window with plotter and control panel
avg_alpha_key,
peak_hold,
msg_key,
+ use_persistence,
+ persist_alpha,
):
+
pubsub.pubsub.__init__(self)
#setup
self.samples = EMPTY_TRACE
self[REF_LEVEL_KEY] = ref_level
self[BASEBAND_FREQ_KEY] = baseband_freq
self[RUNNING_KEY] = True
+ self[USE_PERSISTENCE_KEY] = use_persistence
+ self[PERSIST_ALPHA_KEY] = persist_alpha
for trace in TRACES:
#a function that returns a function
#so the function wont use local trace
self.plotter.enable_legend(True)
self.plotter.enable_point_label(True)
self.plotter.enable_grid_lines(True)
+ self.plotter.set_use_persistence(use_persistence)
+ self.plotter.set_persist_alpha(persist_alpha)
#setup the box with plot and controls
self.control_panel = control_panel(self)
main_box = wx.BoxSizer(wx.HORIZONTAL)
Y_PER_DIV_KEY, X_DIVS_KEY,
Y_DIVS_KEY, REF_LEVEL_KEY,
): self.subscribe(key, self.update_grid)
+ self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
+ self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
#initial update
self.update_grid()
+
def autoscale(self, *args):
"""
Autoscale the fft plot to the last frame.
#
-# Copyright 2008,2009 Free Software Foundation, Inc.
+# Copyright 2008,2009,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
from gnuradio import gr, blks2
from pubsub import pubsub
from constants import *
+import math
##################################################
# FFT sink block (wrapper for old wxgui)
size=fft_window.DEFAULT_WIN_SIZE,
peak_hold=False,
win=None,
+ use_persistence=False,
+ persist_alpha=None,
**kwargs #do not end with a comma
):
#ensure avg alpha
if avg_alpha is None: avg_alpha = 2.0/fft_rate
+ #ensure analog alpha
+ if persist_alpha is None:
+ actual_fft_rate=float(sample_rate/fft_size)/float(max(1,int(float((sample_rate/fft_size)/fft_rate))))
+ #print "requested_fft_rate ",fft_rate
+ #print "actual_fft_rate ",actual_fft_rate
+ analog_cutoff_freq=0.5 # Hertz
+ #calculate alpha from wanted cutoff freq
+ persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_fft_rate)
+
#init
gr.hier_block2.__init__(
self,
)
msgq = gr.msg_queue(2)
sink = gr.message_sink(gr.sizeof_float*fft_size, msgq, True)
+
+
#controller
self.controller = pubsub()
self.controller.subscribe(AVERAGE_KEY, fft.set_average)
avg_alpha_key=AVG_ALPHA_KEY,
peak_hold=peak_hold,
msg_key=MSG_KEY,
+ use_persistence=use_persistence,
+ persist_alpha=persist_alpha,
)
common.register_access_methods(self, self.win)
setattr(self.win, 'set_baseband_freq', getattr(self, 'set_baseband_freq')) #BACKWARDS
fft_size = 256
# build our flow graph
- input_rate = 20.48e3
+ input_rate = 2048.0e3
+
+ #Generate some noise
+ noise =gr.noise_source_c(gr.GR_UNIFORM, 1.0/10)
# Generate a complex sinusoid
#src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 57.50e3, 1)
# We add these throttle blocks so that this demo doesn't
# suck down all the CPU available. Normally you wouldn't use these.
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink1.win, 1, wx.EXPAND)
- self.connect(src1, thr1, sink1)
+ combine1=gr.add_cc()
+ self.connect(src1, (combine1,0))
+ self.connect(noise,(combine1,1))
+ self.connect(combine1,thr1, sink1)
#src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 57.50e3, 1)
thr2 = gr.throttle(gr.sizeof_float, input_rate)
sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
sample_rate=input_rate, baseband_freq=100e3,
ref_level=0, y_per_div=20, y_divs=10)
vbox.Add (sink2.win, 1, wx.EXPAND)
- self.connect(src2, thr2, sink2)
+ combine2=gr.add_ff()
+ c2f2=gr.complex_to_float()
+
+ self.connect(src2, (combine2,0))
+ self.connect(noise,c2f2,(combine2,1))
+ self.connect(combine2, thr2,sink2)
def main ():
app = stdgui2.stdapp (test_app_block, "FFT Sink Test App")
#!/usr/bin/env python
#
-# Copyright 2003,2004,2005,2006,2007,2009 Free Software Foundation, Inc.
+# Copyright 2003,2004,2005,2006,2007,2009,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
y_divs=8, ref_level=50,
sample_rate=1, fft_size=512,
fft_rate=default_fft_rate,
- average=False, avg_alpha=None, title='', peak_hold=False):
+ average=False, avg_alpha=None, title='', peak_hold=False,use_persistence=False,persist_alpha=0.2):
# initialize common attributes
self.baseband_freq = baseband_freq
self.avg_alpha = 2.0 / fft_rate
else:
self.avg_alpha = avg_alpha
+ self.use_persistence = use_persistence
+ self.persist_alpha = persist_alpha
+
self.title = title
self.peak_hold = peak_hold
self.input_is_real = input_is_real
self.peak_hold = enable
self.win.set_peak_hold(enable)
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+ self.win.set_use_persistence(enable)
+
+ def set_persist_alpha(self, persist_alpha):
+ self.persist_alpha = persist_alpha
+ self.win.set_persist_alpha(persist_alpha)
+
def set_avg_alpha(self, avg_alpha):
self.avg_alpha = avg_alpha
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False, **kwargs):
+ title='', size=default_fftsink_size, peak_hold=False, use_persistence=False,persist_alpha=0.2, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_f",
gr.io_signature(1, 1, gr.sizeof_float),
sample_rate=sample_rate, fft_size=fft_size,
fft_rate=fft_rate,
average=average, avg_alpha=avg_alpha, title=title,
- peak_hold=peak_hold)
+ peak_hold=peak_hold,use_persistence=use_persistence,persist_alpha=persist_alpha)
self.s2p = gr.stream_to_vector(gr.sizeof_float, self.fft_size)
self.one_in_n = gr.keep_one_in_n(gr.sizeof_float * self.fft_size,
self.win = fft_window(self, parent, size=size)
self.set_average(self.average)
self.set_peak_hold(self.peak_hold)
+ self.set_use_persistence(self.use_persistence)
+ self.set_persist_alpha(self.persist_alpha)
class fft_sink_c(gr.hier_block2, fft_sink_base):
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False, **kwargs):
+ title='', size=default_fftsink_size, peak_hold=False, use_persistence=False,persist_alpha=0.2, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_c",
gr.io_signature(1, 1, gr.sizeof_gr_complex),
sample_rate=sample_rate, fft_size=fft_size,
fft_rate=fft_rate,
average=average, avg_alpha=avg_alpha, title=title,
- peak_hold=peak_hold)
+ peak_hold=peak_hold, use_persistence=use_persistence,persist_alpha=persist_alpha)
self.s2p = gr.stream_to_vector(gr.sizeof_gr_complex, self.fft_size)
self.one_in_n = gr.keep_one_in_n(gr.sizeof_gr_complex * self.fft_size,
self.win = fft_window(self, parent, size=size)
self.set_average(self.average)
+ self.set_use_persistence(self.use_persistence)
+ self.set_persist_alpha(self.persist_alpha)
self.set_peak_hold(self.peak_hold)
self.average_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Average")
self.average_check_box.Bind(wx.EVT_CHECKBOX, parent.on_average)
control_box.Add(self.average_check_box, 0, wx.EXPAND)
+ self.use_persistence_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Persistence")
+ self.use_persistence_check_box.Bind(wx.EVT_CHECKBOX, parent.on_use_persistence)
+ control_box.Add(self.use_persistence_check_box, 0, wx.EXPAND)
self.peak_hold_check_box = wx.CheckBox(parent=self, style=wx.CHK_2STATE, label="Peak Hold")
self.peak_hold_check_box.Bind(wx.EVT_CHECKBOX, parent.on_peak_hold)
control_box.Add(self.peak_hold_check_box, 0, wx.EXPAND)
"""
#update checkboxes
self.average_check_box.SetValue(self.parent.fftsink.average)
+ self.use_persistence_check_box.SetValue(self.parent.fftsink.use_persistence)
self.peak_hold_check_box.SetValue(self.parent.fftsink.peak_hold)
#update radio buttons
try:
self.peak_hold = False
self.peak_vals = None
+
+ self.use_persistence=False
+ self.persist_alpha=0.2
+
self.plot.SetEnableGrid (True)
# self.SetEnableZoom (True)
y_range = ymin, ymax
self.plot.Draw (graphics, xAxis=x_range, yAxis=y_range, step=self.fftsink.y_per_div)
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+ self.plot.set_use_persistence( enable)
+
+ def set_persist_alpha(self, persist_alpha):
+ self.persist_alpha = persist_alpha
+ self.plot.set_persist_alpha(persist_alpha)
+
def set_peak_hold(self, enable):
self.peak_hold = enable
self.peak_vals = None
self.fftsink.set_average(evt.IsChecked())
self.control_panel.update()
+ def on_use_persistence(self, evt):
+ # print "on_analog"
+ self.fftsink.set_use_persistence(evt.IsChecked())
+ self.control_panel.update()
+
def on_peak_hold(self, evt):
# print "on_peak_hold"
self.fftsink.set_peak_hold(evt.IsChecked())
self.id_y_per_div_10 = wx.NewId()
self.id_y_per_div_20 = wx.NewId()
self.id_average = wx.NewId()
+ self.id_use_persistence = wx.NewId()
self.id_peak_hold = wx.NewId()
self.plot.Bind(wx.EVT_MENU, self.on_average, id=self.id_average)
+ self.plot.Bind(wx.EVT_MENU, self.on_use_persistence, id=self.id_use_persistence)
self.plot.Bind(wx.EVT_MENU, self.on_peak_hold, id=self.id_peak_hold)
self.plot.Bind(wx.EVT_MENU, self.on_incr_ref_level, id=self.id_incr_ref_level)
self.plot.Bind(wx.EVT_MENU, self.on_decr_ref_level, id=self.id_decr_ref_level)
menu = wx.Menu()
self.popup_menu = menu
menu.AppendCheckItem(self.id_average, "Average")
+ menu.AppendCheckItem(self.id_use_persistence, "Persistence")
menu.AppendCheckItem(self.id_peak_hold, "Peak Hold")
menu.Append(self.id_incr_ref_level, "Incr Ref Level")
menu.Append(self.id_decr_ref_level, "Decr Ref Level")
self.checkmarks = {
self.id_average : lambda : self.fftsink.average,
+ self.id_use_persistence : lambda : self.fftsink.use_persistence,
self.id_peak_hold : lambda : self.fftsink.peak_hold,
self.id_y_per_div_1 : lambda : self.fftsink.y_per_div == 1,
self.id_y_per_div_2 : lambda : self.fftsink.y_per_div == 2,
fft_size = 256
# build our flow graph
- input_rate = 20.48e3
+ input_rate = 100*20.48e3
# Generate a complex sinusoid
- #src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ #src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
+ src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
# We add these throttle blocks so that this demo doesn't
# suck down all the CPU available. Normally you wouldn't use these.
self.connect(src1, thr1, sink1)
- #src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 2e3, 1)
- src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1)
+ #src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 100*2e3, 1)
+ src2 = gr.sig_source_f (input_rate, gr.GR_CONST_WAVE, 100*5.75e3, 1)
thr2 = gr.throttle(gr.sizeof_float, input_rate)
sink2 = fft_sink_f (panel, title="Real Data", fft_size=fft_size*2,
sample_rate=input_rate, baseband_freq=100e3,
#
# Created: 2003/11/03
# RCS-ID: $Id$
-# Copyright: (c) 2002,2007
+# Copyright: (c) 2002,2007,2010
# Licence: Use as you wish.
#-----------------------------------------------------------------------------
# 12/15/2003 - Jeff Grimmett (grimmtooth@softhome.net)
#
# May 27, 2007 Johnathan Corgan (jcorgan@corganenterprises.com)
# - Converted from numarray to numpy
+#
+# Apr 23, 2010 Martin Dudok van Heel (http://www.olifantasia.com/gnuradio/contact_olifantasia.gif)
+# - Added Persistence option (emulate after glow of an analog CRT display using IIR)
"""
This is a simple light weight plotting module that can be used with
def __init__(self, parent, id = -1, pos=wx.DefaultPosition,
size=wx.DefaultSize, style= wx.DEFAULT_FRAME_STYLE, name= ""):
+
+ self.use_persistence=False
+ self.alpha=0.3
+ self.decimation=10
+ self.decim_counter=0
"""Constucts a window, which can be a child of a frame, dialog or
any other non-control window"""
# platforms at initialization, but little harm done.
self.OnSize(None) # sets the initial size based on client size
# UNCONDITIONAL, needed to create self._Buffer
+
+
+ def set_use_persistence(self, enable):
+ self.use_persistence = enable
+
+ def set_persist_alpha(self, persist_alpha):
+ self.alpha = persist_alpha
+
# SaveFile
def SaveFile(self, fileName= ''):
if dc == None:
# sets new dc and clears it
- dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
- dc.Clear()
-
+ if self.use_persistence:
+ dc = wx.MemoryDC()
+ dc.SelectObject(self._Buffer)
+ dc.Clear()
+ else:
+ dc = wx.BufferedDC(wx.ClientDC(self), self._Buffer)
+ dc.Clear()
+
dc.BeginDrawing()
# dc.Clear()
-
+
+
+
# set font size for every thing but title and legend
dc.SetFont(self._getFont(self._fontSizeAxis))
self.last_draw = (graphics, xAxis, yAxis) # saves most recient values
+ if False:
+ ptx,pty,rectWidth,rectHeight= self._point2ClientCoord(p1, p2)
+ #dc.SetPen(wx.Pen(wx.BLACK))
+ dc.SetBrush(wx.Brush( wx.BLACK, wx.SOLID ) ) #wx.SOLID wx.TRANSPARENT ) )
+ #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
+ dc.DrawRectangle( ptx,pty, rectWidth,rectHeight)
+ #dc.SetBrush(wx.Brush( wx.WHITE, wx.SOLID ) )
+ #dc.SetLogicalFunction(wx.COPY)
+
# Get ticks and textExtents for axis if required
if self._xSpec is not 'none':
if self._xUseScopeTicks:
scale = (self.plotbox_size-textSize_scale) / (p2-p1)* _numpy.array((1,-1))
shift = -p1*scale + self.plotbox_origin + textSize_shift * _numpy.array((1,-1))
self._pointScale= scale # make available for mouse events
- self._pointShift= shift
+ self._pointShift= shift
+
+ #dc.SetLogicalFunction(wx.INVERT) #wx.XOR wx.INVERT
self._drawAxes(dc, p1, p2, scale, shift, xticks, yticks)
+ #dc.SetLogicalFunction(wx.COPY)
graphics.scaleAndShift(scale, shift)
graphics.setPrinterScale(self.printerScale) # thicken up lines and markers if printing
dc.SetClippingRegion(ptx,pty,rectWidth,rectHeight)
# Draw the lines and markers
#start = _time.clock()
+
graphics.draw(dc)
# print "entire graphics drawing took: %f second"%(_time.clock() - start)
# remove the clipping region
dc.DestroyClippingRegion()
dc.EndDrawing()
+
+
+ if self.use_persistence:
+ dc=None
+ self._Buffer.CopyToBuffer(self._Bufferarray) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
+ ## do the IIR filter
+ alpha_int=int(float(self.alpha*256))
+ if True:
+ _numpy.add(self._Bufferarray,0,self._Buffer3array)
+ _numpy.multiply(self._Buffer3array,alpha_int,self._Buffer3array)
+ _numpy.multiply(self._Buffer2array,(256-alpha_int),self._Buffer2array)
+ _numpy.add(self._Buffer3array,self._Buffer2array,self._Buffer2array)
+ _numpy.right_shift(self._Buffer2array,8,self._Buffer2array)
+ elif False:
+ self._Buffer2array=(self._Bufferarray.astype(_numpy.uint32) *alpha_int + self._Buffer2array*(256-alpha_int)).__rshift__(8)
+ elif False:
+ self._Buffer2array *=(256-alpha_int)
+ self._Buffer2array +=self._Bufferarray.astype(_numpy.uint32)*alpha_int
+ self._Buffer2array /=256
+
+ ##copy back to image buffer
+ self._Buffer2.CopyFromBuffer(self._Buffer2array.astype(_numpy.uint8)) #, format=wx.BitmapBufferFormat_RGB, stride=-1)
+
+ #draw to the screen
+ #self.decim_counter=self.decim_counter+1
+ if True: #self.decim_counter>self.decimation:
+ #self.decim_counter=0
+ dc2 = wx.ClientDC( self )
+ dc2.BeginDrawing()
+ dc2.DrawBitmap(self._Buffer2, 0, 0, False)
+ #dc2.DrawBitmap(self._Buffer, 0, 0, False)
+ dc2.EndDrawing()
def Redraw(self, dc= None):
"""Redraw the existing plot."""
if self.last_PointLabel != None:
self._drawPointLabel(self.last_PointLabel) #erase old
self.last_PointLabel = None
+
+ #paint current buffer to screen
dc = wx.BufferedPaintDC(self, self._Buffer)
def OnSize(self,event):
# Make new offscreen bitmap: this bitmap will always have the
# current drawing in it, so it can be used to save the image to
# a file, or whatever.
- self._Buffer = wx.EmptyBitmap(Size[0],Size[1])
+ self._Buffer = wx.EmptyBitmap(Size[0],Size[1],24)
+
+
+ if True: #self.use_persistence:
+ #self._Bufferarray = _numpy.zeros((Size[0], Size[1],3), dtype=_numpy.uint8)
+ self._Bufferarray = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint8)
+
+ # Make new second offscreen bitmap: this bitmap will always have the
+ # last drawing in it, so it can be used to do display time dependent processing
+ # like averaging (IIR) or show differences between updates
+ self._Buffer2 = wx.EmptyBitmap(Size[0],Size[1],24)
+ # now the extra buffers for the IIR processing
+ # note the different datatype uint32
+ self._Buffer2array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
+ self._Buffer3array = _numpy.zeros((Size[0]* Size[1]*3), dtype=_numpy.uint32) #dtype=_numpy.float
+ # optional you can set the ufunct buffer size to improve speed
+ #_numpy.setbufsize(16*((Size[0]* Size[1]*3)/16 +1))
self._setSize()
self.last_PointLabel = None #reset pointLabel
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
"""
#init
grid_plotter_base.__init__(self, parent, MIN_PADDING)
+ self.set_use_persistence(False)
#setup legend cache
self._legend_cache = self.new_gl_cache(self._draw_legend, 50)
self.enable_legend(False)
#
-# Copyright 2008, 2009 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@param parent the parent widgit
"""
attribList = (wx.glcanvas.WX_GL_DOUBLEBUFFER, wx.glcanvas.WX_GL_RGBA)
- wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList)
+ wx.glcanvas.GLCanvas.__init__(self, parent, attribList=attribList);
+ self.use_persistence=False
+ self.persist_alpha=2.0/15
+ self.clear_accum=True
self._gl_init_flag = False
self._resized_flag = True
self._init_fcns = list()
self.Bind(wx.EVT_SIZE, self._on_size)
self.Bind(wx.EVT_ERASE_BACKGROUND, lambda e: None)
+ def set_use_persistence(self,enable):
+ self.use_persistence=enable
+ self.clear_accum=True
+
+ def set_persist_alpha(self,analog_alpha):
+ self.persist_alpha=analog_alpha
+
def new_gl_cache(self, draw_fcn, draw_pri=50):
"""
Create a new gl cache.
"""
self.lock()
self._resized_flag = True
+ self.clear_accum=True
self.unlock()
def _on_paint(self, event):
self._resized_flag = False
#clear, draw functions, swap
GL.glClear(GL.GL_COLOR_BUFFER_BIT)
+
+ if False:
+ GL.glEnable (GL.GL_LINE_SMOOTH)
+ GL.glEnable (GL.GL_POLYGON_SMOOTH)
+ GL.glEnable (GL.GL_BLEND)
+ GL.glBlendFunc (GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA)
+ GL.glHint (GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST) #GL.GL_DONT_CARE)
+ GL.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST)
+ #GL.glLineWidth (1.5)
+
+ GL.glEnable(GL.GL_MULTISAMPLE) #Enable Multisampling anti-aliasing
+
+
for fcn in self._draw_fcns: fcn[1]()
+
+ if self.use_persistence:
+ if self.clear_accum:
+ #GL.glClear(GL.GL_ACCUM_BUFFER_BIT)
+ GL.glAccum(GL.GL_LOAD, 1.0)
+ self.clear_accum=False
+
+ GL.glAccum(GL.GL_MULT, 1.0-self.persist_alpha)
+ GL.glAccum(GL.GL_ACCUM, self.persist_alpha)
+ GL.glAccum(GL.GL_RETURN, 1.0)
self.SwapBuffers()
self.unlock()
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# Constants
##################################################
DEFAULT_FRAME_RATE = gr.prefs().get_long('wxgui', 'scope_rate', 30)
+PERSIST_ALPHA_MIN_EXP, PERSIST_ALPHA_MAX_EXP = -2, 0
+SLIDER_STEPS = 100
DEFAULT_WIN_SIZE = (600, 300)
COUPLING_MODES = (
('DC', False),
parent[SHOW_CONTROL_PANEL_KEY] = True
parent.subscribe(SHOW_CONTROL_PANEL_KEY, self.Show)
control_box = wx.BoxSizer(wx.VERTICAL)
+
+ ##################################################
+ # Persistence
+ ##################################################
+
+ forms.check_box(
+ sizer=control_box, parent=self, label='Persistence',
+ ps=parent, key=USE_PERSISTENCE_KEY,
+ )
+ #static text and slider for analog alpha
+ persist_alpha_text = forms.static_text(
+ sizer=control_box, parent=self, label='Analog Alpha',
+ converter=forms.float_converter(lambda x: '%.4f'%x),
+ ps=parent, key=PERSIST_ALPHA_KEY, width=50,
+ )
+ persist_alpha_slider = forms.log_slider(
+ sizer=control_box, parent=self,
+ min_exp=PERSIST_ALPHA_MIN_EXP,
+ max_exp=PERSIST_ALPHA_MAX_EXP,
+ num_steps=SLIDER_STEPS,
+ ps=parent, key=PERSIST_ALPHA_KEY,
+ )
+ for widget in (persist_alpha_text, persist_alpha_slider):
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.Enable)
+ widget.Enable(parent[USE_PERSISTENCE_KEY])
+ parent.subscribe(USE_PERSISTENCE_KEY, widget.ShowItems)
+ #allways show initially, so room is reserved for them
+ widget.ShowItems(True) # (parent[USE_PERSISTENCE_KEY])
+
+ parent.subscribe(USE_PERSISTENCE_KEY, self._update_layout)
+
##################################################
# Axes Options
##################################################
def _on_decr_y_off(self, event):
self.parent[Y_OFF_KEY] = self.parent[Y_OFF_KEY] - self.parent[Y_PER_DIV_KEY]
+ ##################################################
+ # subscriber handlers
+ ##################################################
+ def _update_layout(self,key):
+ # Just ignore the key value we get
+ # we only need to now that the visability or size of something has changed
+ self.parent.Layout()
+ #self.parent.Fit()
+
##################################################
# Scope window with plotter and control panel
##################################################
trigger_channel_key,
decimation_key,
msg_key,
+ use_persistence,
+ persist_alpha,
):
pubsub.pubsub.__init__(self)
#check num inputs
self[TRIGGER_MODE_KEY] = gr.gr_TRIG_MODE_AUTO
self[TRIGGER_SLOPE_KEY] = gr.gr_TRIG_SLOPE_POS
self[T_FRAC_OFF_KEY] = 0.5
+ self[USE_PERSISTENCE_KEY] = use_persistence
+ self[PERSIST_ALPHA_KEY] = persist_alpha
for i in range(num_inputs):
self.proxy(common.index_key(AC_COUPLE_KEY, i), controller, common.index_key(ac_couple_key, i))
#init panel and plot
self.plotter.enable_legend(True)
self.plotter.enable_point_label(True)
self.plotter.enable_grid_lines(True)
+ self.plotter.set_use_persistence(use_persistence)
+ self.plotter.set_persist_alpha(persist_alpha)
#setup the box with plot and controls
self.control_panel = control_panel(self)
main_box = wx.BoxSizer(wx.HORIZONTAL)
XY_MODE_KEY, AUTORANGE_KEY, T_FRAC_OFF_KEY,
TRIGGER_SHOW_KEY, XY_MARKER_KEY, X_CHANNEL_KEY, Y_CHANNEL_KEY,
]: self.subscribe(key, self.update_grid)
+ #register events for plotter settings
+ self.subscribe(USE_PERSISTENCE_KEY, self.plotter.set_use_persistence)
+ self.subscribe(PERSIST_ALPHA_KEY, self.plotter.set_persist_alpha)
#initial update
self.update_grid()
self.plotter.set_y_grid(self.get_y_min(), self.get_y_max(), self[Y_PER_DIV_KEY])
#redraw current sample
self.handle_samples()
+
#
-# Copyright 2008 Free Software Foundation, Inc.
+# Copyright 2008,2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
from gnuradio import gr
from pubsub import pubsub
from constants import *
+import math
class ac_couple_block(gr.hier_block2):
"""
ac_couple=False,
num_inputs=1,
frame_rate=scope_window.DEFAULT_FRAME_RATE,
+ use_persistence=False,
+ persist_alpha=None,
**kwargs #do not end with a comma
):
+ #ensure analog alpha
+ if persist_alpha is None:
+ actual_frame_rate=float(frame_rate)
+ analog_cutoff_freq=0.5 # Hertz
+ #calculate alpha from wanted cutoff freq
+ persist_alpha = 1.0 - math.exp(-2.0*math.pi*analog_cutoff_freq/actual_frame_rate)
+
if not t_scale: t_scale = 10.0/sample_rate
#init
gr.hier_block2.__init__(
trigger_channel_key=TRIGGER_CHANNEL_KEY,
decimation_key=DECIMATION_KEY,
msg_key=MSG_KEY,
+ use_persistence=use_persistence,
+ persist_alpha=persist_alpha,
)
common.register_access_methods(self, self.win)
#connect
def __init__(self, frame, panel, vbox, argv):
stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv)
+ default_input_rate = 1e6
if len(argv) > 1:
- frame_decim = int(argv[1])
+ input_rate = int(argv[1])
else:
- frame_decim = 1
+ input_rate = default_input_rate
if len(argv) > 2:
v_scale = float(argv[2]) # start up at this v_scale value
if len(argv) > 3:
t_scale = float(argv[3]) # start up at this t_scale value
else:
- t_scale = .00003 # old behavior
+ t_scale = .00003*default_input_rate/input_rate # old behavior
- print "frame decim %s v_scale %s t_scale %s" % (frame_decim,v_scale,t_scale)
+ print "input rate %s v_scale %s t_scale %s" % (input_rate,v_scale,t_scale)
- input_rate = 1e6
# Generate a complex sinusoid
- self.src0 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 25.1e3, 1e3)
+ ampl=1.0e3
+ self.src0 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 25.1e3*input_rate/default_input_rate, ampl)
+ self.noise =gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 11.1*25.1e3*input_rate/default_input_rate, ampl/10)
+ #self.noise =gr.noise_source_c(gr.GR_GAUSSIAN, ampl/10)
+ self.combine=gr.add_cc()
# We add this throttle block so that this demo doesn't suck down
# all the CPU available. You normally wouldn't use it...
# Ultimately this will be
# self.connect("src0 throttle scope")
- self.connect(self.src0, self.thr, scope)
+ self.connect(self.src0,(self.combine,0))
+ self.connect(self.noise,(self.combine,1))
+ self.connect(self.combine, self.thr, scope)
def main ():
app = stdgui2.stdapp (test_top_block, "O'Scope Test App")
MAJOR_VERSION=3
API_COMPAT=3
-MINOR_VERSION=git
-MAINT_VERSION=
+MINOR_VERSION=0-rc0
+MAINT_VERSION=0