From 6108bf6ad15f899e71b26c72302912956e365646 Mon Sep 17 00:00:00 2001 From: Chris Kuethe Date: Sun, 10 May 2015 15:32:36 -0700 Subject: [PATCH] add IF and BB gain knobs to rx_gui --- apps/modes_gui | 20 +++++++++++- res/modes_rx.ui | 82 ++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 83 insertions(+), 19 deletions(-) diff --git a/apps/modes_gui b/apps/modes_gui index ca44ced..294d19b 100755 --- a/apps/modes_gui +++ b/apps/modes_gui @@ -52,6 +52,8 @@ class mainwindow(QtGui.QMainWindow): #should round to actual achieved gain self.ui.line_gain.insert(defaults["gain"]) + self.ui.line_bb_gain.insert(defaults["bb_gain"]) + self.ui.line_if_gain.insert(defaults["if_gain"]) #default to 5dB self.ui.line_threshold.insert(defaults["threshold"]) @@ -143,6 +145,8 @@ class mainwindow(QtGui.QMainWindow): #hook up parameter-changed signals so we can change gain, rate, etc. while running self.ui.combo_rate.currentIndexChanged['QString'].connect(self.update_sample_rate) self.ui.line_gain.editingFinished.connect(self.update_gain) + self.ui.line_bb_gain.editingFinished.connect(self.update_bb_gain) + self.ui.line_if_gain.editingFinished.connect(self.update_if_gain) self.ui.combo_source.currentIndexChanged['QString'].connect(self.populate_source_options) #hook up live data text box update signal @@ -161,6 +165,14 @@ class mainwindow(QtGui.QMainWindow): if self.running: self._radio.set_gain(float(self.ui.line_gain.text())) + def update_bb_gain(self): + if self.running: + self._radio.set_bb_gain(float(self.ui.line_bb_gain.text())) + + def update_if_gain(self): + if self.running: + self._radio.set_if_gain(float(self.ui.line_if_gain.text())) + ############ widget update functions for non-mapped widgets ############ def update_heading_widget(self, index): if index.model() is not None: @@ -302,6 +314,8 @@ class mainwindow(QtGui.QMainWindow): options.rate = float(self.ui.combo_rate.currentText()) * 1e6 options.antenna = str(self.ui.combo_ant.currentText()) options.gain = float(self.ui.line_gain.text()) + options.bb_gain = float(self.ui.line_bb_gain.text()) + options.if_gain = float(self.ui.line_if_gain.text()) options.threshold = float(self.ui.line_threshold.text()) options.pmf = self.ui.check_pmf.isChecked() options.dcblock = self.ui.check_dcblock.isChecked() @@ -387,6 +401,8 @@ class mainwindow(QtGui.QMainWindow): self.prefs["samplerate"] = options.rate self.prefs["antenna"] = options.antenna self.prefs["gain"] = options.gain + self.prefs["bb_gain"] = options.bb_gain + self.prefs["if_gain"] = options.if_gain self.prefs["pmf"] = "1" if options.pmf else "0" self.prefs["dcblock"] = "1" if options.dcblock else "0" self.prefs["source"] = self.ui.combo_source.currentText() @@ -450,7 +466,9 @@ class mainwindow(QtGui.QMainWindow): defaults["pmf"] = None defaults["dcblock"] = None defaults["antenna"] = None - defaults["gain"] = "25" + defaults["gain"] = "10" + defaults["bb_gain"] = "20" + defaults["if_gain"] = "20" defaults["kml"] = "1" defaults["kmlfile"] = "modes.kml" defaults["sbs1"] = "0" diff --git a/res/modes_rx.ui b/res/modes_rx.ui index 52e5793..5e6a220 100644 --- a/res/modes_rx.ui +++ b/res/modes_rx.ui @@ -7,7 +7,7 @@ 0 0 687 - 422 + 460 @@ -103,7 +103,7 @@ 10 20 236 - 251 + 300 @@ -210,7 +210,7 @@ -1 117 221 - 71 + 130 @@ -221,7 +221,7 @@ 90 - 40 + 100 121 27 @@ -237,7 +237,27 @@ - + + + + 90 + 40 + 71 + 27 + + + + + + + 90 + 70 + 71 + 27 + + + + 10 @@ -247,10 +267,10 @@ - Gain + RF Gain - + 10 @@ -259,11 +279,37 @@ 17 + + BB Gain + + + + + + 10 + 70 + 66 + 17 + + + + IF Gain + + + + + + 10 + 100 + 66 + 17 + + Antenna - + 160 @@ -307,7 +353,7 @@ 10 - 200 + 270 221 22 @@ -320,7 +366,7 @@ 10 - 220 + 250 221 22 @@ -947,7 +993,7 @@ - + @@ -1032,13 +1078,19 @@ 0 0 687 - 25 + 27 + + QWebView + QWidget +
QtWebKitWidgets/QWebView
+ 1 +
QwtDial QWidget @@ -1055,12 +1107,6 @@ QwtDial
qwt_compass.h
- - QWebView - QWidget -
QtWebKit/qwebview.h
- 1 -