diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2015-03-28 17:36:42 -0700 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-03-28 17:36:42 -0700 |
commit | 7ccbd3356c2ad0b64ec363216d9eb766564811ba (patch) | |
tree | 5159f5b0b9a94b2e72730efac3463d47d5ed8ff9 | |
parent | ce73dafb67491bc785ade42c0eb4e84cc1a273ac (diff) | |
parent | fce06576a937bf16f12b012e2739e07ad8860f67 (diff) |
Merge remote-tracking branch 'tom/qtgui/bug767' into maint
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
-rw-r--r-- | gr-qtgui/lib/FrequencyDisplayPlot.cc | 3 | ||||
-rw-r--r-- | gr-qtgui/lib/freq_sink_c_impl.cc | 5 | ||||
-rw-r--r-- | gr-qtgui/lib/freq_sink_f_impl.cc | 5 |
3 files changed, 9 insertions, 4 deletions
diff --git a/gr-qtgui/lib/FrequencyDisplayPlot.cc b/gr-qtgui/lib/FrequencyDisplayPlot.cc index 41050edfc2..384ec8d633 100644 --- a/gr-qtgui/lib/FrequencyDisplayPlot.cc +++ b/gr-qtgui/lib/FrequencyDisplayPlot.cc @@ -90,7 +90,7 @@ FrequencyDisplayPlot::FrequencyDisplayPlot(int nplots, QWidget* parent) d_start_frequency = -1; d_stop_frequency = 1; - d_numPoints = 1024; + d_numPoints = 0; d_min_fft_data = new double[d_numPoints]; d_max_fft_data = new double[d_numPoints]; d_xdata = new double[d_numPoints]; @@ -287,7 +287,6 @@ FrequencyDisplayPlot::setFrequencyRange(const double centerfreq, else startFreq = (centerfreq - bandwidth/2.0f) / units; - d_xdata_multiplier = units; bool reset = false; diff --git a/gr-qtgui/lib/freq_sink_c_impl.cc b/gr-qtgui/lib/freq_sink_c_impl.cc index fa8e38dd9f..adc1f76857 100644 --- a/gr-qtgui/lib/freq_sink_c_impl.cc +++ b/gr-qtgui/lib/freq_sink_c_impl.cc @@ -198,7 +198,10 @@ namespace gr { void freq_sink_c_impl::set_fft_size(const int fftsize) { - d_main_gui->setFFTSize(fftsize); + if((fftsize > 16) && (fftsize < 16384)) + d_main_gui->setFFTSize(fftsize); + else + throw std::runtime_error("freq_sink: FFT size must be > 16 and < 16384."); } int diff --git a/gr-qtgui/lib/freq_sink_f_impl.cc b/gr-qtgui/lib/freq_sink_f_impl.cc index 1df915b32c..1e01208b27 100644 --- a/gr-qtgui/lib/freq_sink_f_impl.cc +++ b/gr-qtgui/lib/freq_sink_f_impl.cc @@ -197,7 +197,10 @@ namespace gr { void freq_sink_f_impl::set_fft_size(const int fftsize) { - d_main_gui->setFFTSize(fftsize); + if((fftsize > 16) && (fftsize < 16384)) + d_main_gui->setFFTSize(fftsize); + else + throw std::runtime_error("freq_sink: FFT size must be > 16 and < 16384."); } int |