[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 10/23: qtgui: allows toggling rf frequencie
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 10/23: qtgui: allows toggling rf frequencies on/off in GRC options box. |
Date: |
Thu, 26 Jun 2014 19:54:44 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit e27945c7c25bca5e9dd2e98cee4ba7dce2303e99
Author: Tom Rondeau <address@hidden>
Date: Tue Jun 24 22:40:50 2014 -0400
qtgui: allows toggling rf frequencies on/off in GRC options box.
Addresses Issue #673.
---
gr-qtgui/grc/qtgui_sink_x.xml | 21 ++++++++++++++++++++-
gr-qtgui/include/gnuradio/qtgui/SpectrumGUIClass.h | 2 ++
gr-qtgui/include/gnuradio/qtgui/sink_c.h | 1 +
.../include/gnuradio/qtgui/spectrumdisplayform.h | 1 +
gr-qtgui/lib/SpectrumGUIClass.cc | 9 ++++++++-
gr-qtgui/lib/sink_c_impl.cc | 7 +++++++
gr-qtgui/lib/sink_c_impl.h | 1 +
gr-qtgui/lib/spectrumdisplayform.cc | 6 ++++++
8 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml
index 6e13481..ea14947 100644
--- a/gr-qtgui/grc/qtgui_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_sink_x.xml
@@ -27,10 +27,12 @@ self.$(id).set_update_time(1.0/$rate)
self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
$(gui_hint()($win))
+self.$(id).enable_rf_freq($showrf)
+
#if $freqchangevar() is not None
def $(id)_callback(p, num):
if num == 1 or num == 2: self.set_$(freqchangevar)(p.x())
-
+
Qt.QObject.connect(self._$(id)_win, Qt.SIGNAL("plotPointSelected(QPointF,
int)"), $(id)_callback )
#end if
@@ -105,6 +107,23 @@ Qt.QObject.connect(self._$(id)_win,
Qt.SIGNAL("plotPointSelected(QPointF, int)")
<value>10</value>
<type>real</type>
</param>
+
+ <param>
+ <name>Show RF Freq</name>
+ <key>showrf</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+
<param>
<name>Plot Frequency</name>
<key>plotfreq</key>
diff --git a/gr-qtgui/include/gnuradio/qtgui/SpectrumGUIClass.h
b/gr-qtgui/include/gnuradio/qtgui/SpectrumGUIClass.h
index f95ab64..68a7201 100644
--- a/gr-qtgui/include/gnuradio/qtgui/SpectrumGUIClass.h
+++ b/gr-qtgui/include/gnuradio/qtgui/SpectrumGUIClass.h
@@ -103,6 +103,8 @@ public:
void setUpdateTime(double t);
+ void enableRFFreq(bool en);
+
protected:
private:
diff --git a/gr-qtgui/include/gnuradio/qtgui/sink_c.h
b/gr-qtgui/include/gnuradio/qtgui/sink_c.h
index e0c7700..c9cb48b 100644
--- a/gr-qtgui/include/gnuradio/qtgui/sink_c.h
+++ b/gr-qtgui/include/gnuradio/qtgui/sink_c.h
@@ -91,6 +91,7 @@ namespace gr {
virtual void set_frequency_range(const double centerfreq,
const double bandwidth) = 0;
virtual void set_fft_power_db(double min, double max) = 0;
+ virtual void enable_rf_freq(bool en) = 0;
//void set_time_domain_axis(double min, double max);
//void set_constellation_axis(double xmin, double xmax,
diff --git a/gr-qtgui/include/gnuradio/qtgui/spectrumdisplayform.h
b/gr-qtgui/include/gnuradio/qtgui/spectrumdisplayform.h
index 6b43661..50cbc58 100644
--- a/gr-qtgui/include/gnuradio/qtgui/spectrumdisplayform.h
+++ b/gr-qtgui/include/gnuradio/qtgui/spectrumdisplayform.h
@@ -71,6 +71,7 @@ public slots:
void closeEvent(QCloseEvent * e);
void windowTypeChanged(int newItem);
void useRFFrequenciesCB(bool useRFFlag);
+ void toggleRFFrequencies(bool en);
void waterfallMaximumIntensityChangedCB(double);
void waterfallMinimumIntensityChangedCB(double);
void waterfallIntensityColorTypeChanged(int);
diff --git a/gr-qtgui/lib/SpectrumGUIClass.cc b/gr-qtgui/lib/SpectrumGUIClass.cc
index 8098018..b7c5883 100644
--- a/gr-qtgui/lib/SpectrumGUIClass.cc
+++ b/gr-qtgui/lib/SpectrumGUIClass.cc
@@ -93,7 +93,7 @@ SpectrumGUIClass::openSpectrumWindow(QWidget* parent,
_realTimeDomainPoints = new double[_dataPoints];
_imagTimeDomainPoints = new double[_dataPoints];
_fftBuffersCreatedFlag = true;
-
+
memset(_fftPoints, 0x0, _dataPoints*sizeof(float));
memset(_realTimeDomainPoints, 0x0, _dataPoints*sizeof(double));
memset(_imagTimeDomainPoints, 0x0, _dataPoints*sizeof(double));
@@ -470,5 +470,12 @@ SpectrumGUIClass::setUpdateTime(double t)
_spectrumDisplayForm->setUpdateTime(_updateTime);
}
+void
+SpectrumGUIClass::enableRFFreq(bool en)
+{
+ gr::thread::scoped_lock lock(d_mutex);
+ _spectrumDisplayForm->toggleRFFrequencies(en);
+}
+
#endif /* SPECTRUM_GUI_CLASS_CPP */
diff --git a/gr-qtgui/lib/sink_c_impl.cc b/gr-qtgui/lib/sink_c_impl.cc
index 992512a..5d1c33e 100644
--- a/gr-qtgui/lib/sink_c_impl.cc
+++ b/gr-qtgui/lib/sink_c_impl.cc
@@ -218,6 +218,13 @@ namespace gr {
d_main_gui->setFrequencyAxis(min, max);
}
+ void
+ sink_c_impl::enable_rf_freq(bool en)
+ {
+ std::cerr << "ENABLE RF: " << en << std::endl;
+ d_main_gui->enableRFFreq(en);
+ }
+
/*
void
sink_c_impl::set_time_domain_axis(double min, double max)
diff --git a/gr-qtgui/lib/sink_c_impl.h b/gr-qtgui/lib/sink_c_impl.h
index 18508d3..d303c05 100644
--- a/gr-qtgui/lib/sink_c_impl.h
+++ b/gr-qtgui/lib/sink_c_impl.h
@@ -95,6 +95,7 @@ namespace gr {
void set_frequency_range(const double centerfreq,
const double bandwidth);
void set_fft_power_db(double min, double max);
+ void enable_rf_freq(bool en);
//void set_time_domain_axis(double min, double max);
//void set_constellation_axis(double xmin, double xmax,
diff --git a/gr-qtgui/lib/spectrumdisplayform.cc
b/gr-qtgui/lib/spectrumdisplayform.cc
index 0b5f630..aaaae63 100644
--- a/gr-qtgui/lib/spectrumdisplayform.cc
+++ b/gr-qtgui/lib/spectrumdisplayform.cc
@@ -572,6 +572,12 @@ SpectrumDisplayForm::useRFFrequenciesCB(bool useRFFlag)
setFrequencyRange(_centerFrequency, _startFrequency, _stopFrequency);
}
+void
+SpectrumDisplayForm::toggleRFFrequencies(bool en)
+{
+ UseRFFrequenciesCheckBox->setChecked(en);
+}
+
void
SpectrumDisplayForm::waterfallMaximumIntensityChangedCB(double newValue)
- [Commit-gnuradio] [gnuradio] branch master updated (ad9b547 -> 71a57cc), git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 07/23: qtgui: Mostly adds sunset and cool color schemes for waterfall/raster plots., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 10/23: qtgui: allows toggling rf frequencies on/off in GRC options box.,
git <=
- [Commit-gnuradio] [gnuradio] 12/23: qtgui: freq, waterfall, and sink blocks produce a frequency message when double-clicked. Also can take in a frequency message to adjust the x-axis., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 05/23: digital: adding a rotate_phase message for the constellation_receiver to adjust the phase of the constellation., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 01/23: volk: cmake: Rename GrBoost to VolkBoost to differentiate it from GR's GrBoost. Although they set the same BOOST variables internally, this change make it clear which cmake file to include., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 09/23: qtgui: minor mods, including putting min/max lines in FFT sink behind all other lines., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 04/23: blocks: adding a message port to the copy block to enable/disable copy., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 13/23: filter: adds a message input port to frequency xlating FIR filter to update the frequency., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 03/23: digital: expose set_constellation message port in GRC for constellation_receiver., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 08/23: qtgui: adds an alternative qss file., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 14/23: docs: adding docs for blocks::copy and digital::constellation_receiver to describe their message ports., git, 2014/06/26
- [Commit-gnuradio] [gnuradio] 15/23: qtgui: dynamically adjust min/max amplitude for qtgui freq and waterfall plots., git, 2014/06/26