[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/09: qtgui: Fixes problem with half spect
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/09: qtgui: Fixes problem with half spectrum when set to 2048. |
Date: |
Sun, 26 Apr 2015 22:37:13 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 424ec68e3f9dd0081a0fe345a3fed6f30a1ae104
Author: Tom Rondeau <address@hidden>
Date: Wed Apr 22 20:58:08 2015 -0400
qtgui: Fixes problem with half spectrum when set to 2048.
Same issue we saw before in Issue # 767; fixed in commit
fce06576a937bf16f12b012e2739e07ad8860f67
Also provides a fix for the half spectrum case when a center frequency
is specified. Used to pin it to 0.
---
gr-qtgui/include/gnuradio/qtgui/FrequencyDisplayPlot.h | 1 +
gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h | 1 +
gr-qtgui/lib/FrequencyDisplayPlot.cc | 5 +++--
gr-qtgui/lib/WaterfallDisplayPlot.cc | 7 ++++---
4 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/gr-qtgui/include/gnuradio/qtgui/FrequencyDisplayPlot.h
b/gr-qtgui/include/gnuradio/qtgui/FrequencyDisplayPlot.h
index c947892..8b2ef45 100644
--- a/gr-qtgui/include/gnuradio/qtgui/FrequencyDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/FrequencyDisplayPlot.h
@@ -147,6 +147,7 @@ private:
double d_start_frequency;
double d_stop_frequency;
+ double d_center_frequency;
double d_ymax;
double d_ymin;
bool d_half_freq;
diff --git a/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
b/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
index f885deb..42f252c 100644
--- a/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
@@ -109,6 +109,7 @@ private:
double d_start_frequency;
double d_stop_frequency;
+ double d_center_frequency;
int d_xaxis_multiplier;
bool d_half_freq;
bool d_legend_enabled;
diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc
b/gr-qtgui/lib/FrequencyDisplayPlot.cc
index 349ce8e..afbd771 100644
--- a/gr-qtgui/lib/FrequencyDisplayPlot.cc
+++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc
@@ -290,7 +290,7 @@ FrequencyDisplayPlot::setFrequencyRange(const double
centerfreq,
double startFreq;
double stopFreq = (centerfreq + bandwidth/2.0f) / units;
if(d_half_freq)
- startFreq = 0;
+ startFreq = centerfreq / units;
else
startFreq = (centerfreq - bandwidth/2.0f) / units;
@@ -303,6 +303,7 @@ FrequencyDisplayPlot::setFrequencyRange(const double
centerfreq,
if(stopFreq > startFreq) {
d_start_frequency = startFreq;
d_stop_frequency = stopFreq;
+ d_center_frequency = centerfreq / units;
if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (d_zoomer != NULL)) {
double display_units = ceil(log10(units)/2.0);
@@ -493,7 +494,7 @@ FrequencyDisplayPlot::setPlotPosHalf(bool half)
{
d_half_freq = half;
if(half)
- d_start_frequency = 0;
+ d_start_frequency = d_center_frequency;
}
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc
b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index 8564758..2f7e967 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -138,7 +138,7 @@ WaterfallDisplayPlot::WaterfallDisplayPlot(int nplots,
QWidget* parent)
d_stop_frequency = 1;
resize(parent->width(), parent->height());
- d_numPoints = 1024;
+ d_numPoints = 0;
d_half_freq = false;
d_legend_enabled = true;
@@ -230,7 +230,7 @@ WaterfallDisplayPlot::setFrequencyRange(const double
centerfreq,
double startFreq;
double stopFreq = (centerfreq + bandwidth/2.0f) / units;
if(d_half_freq)
- startFreq = 0;
+ startFreq = centerfreq / units;
else
startFreq = (centerfreq - bandwidth/2.0f) / units;
@@ -244,6 +244,7 @@ WaterfallDisplayPlot::setFrequencyRange(const double
centerfreq,
if(stopFreq > startFreq) {
d_start_frequency = startFreq;
d_stop_frequency = stopFreq;
+ d_center_frequency = centerfreq / units;
if((axisScaleDraw(QwtPlot::xBottom) != NULL) && (d_zoomer != NULL)) {
double display_units = ceil(log10(units)/2.0);
@@ -633,7 +634,7 @@ WaterfallDisplayPlot::setPlotPosHalf(bool half)
{
d_half_freq = half;
if(half)
- d_start_frequency = 0;
+ d_start_frequency = d_center_frequency;
}
- [Commit-gnuradio] [gnuradio] branch maint updated (e61a5c8 -> 6020965), git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 05/09: runtime: fixed default srcid value for PythonTag class, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 04/09: blocks: added tag tests to vector source QA code, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 02/09: blocks: vector_source: fixed tag srcid propagation when not using repeat mode, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 03/09: runtime: added default xtor & dtor to tag_t; srcid default is now PMT_F, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 07/09: Fixed garbled Doxygen formatting of channel map, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 08/09: Merge remote-tracking branch 'mmueller/docs_typo_sinusiod' into maint, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 06/09: qtgui: Fixes problem with half spectrum when set to 2048.,
git <=
- [Commit-gnuradio] [gnuradio] 09/09: Merge remote-tracking branch 'nowls/vec_src_fix_tag_srcid' into maint, git, 2015/04/26
- [Commit-gnuradio] [gnuradio] 01/09: Typos: Sinusiods in channel model docs, git, 2015/04/26