diff options
Diffstat (limited to 'gr-qtgui/lib/qtgui_sink_f.cc')
-rw-r--r-- | gr-qtgui/lib/qtgui_sink_f.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/gr-qtgui/lib/qtgui_sink_f.cc b/gr-qtgui/lib/qtgui_sink_f.cc index a435064c0..a02f89d0a 100644 --- a/gr-qtgui/lib/qtgui_sink_f.cc +++ b/gr-qtgui/lib/qtgui_sink_f.cc @@ -1,19 +1,19 @@ /* -*- c++ -*- */ /* * Copyright 2008,2009,2010,2011 Free Software Foundation, Inc. - * + * * This file is part of GNU Radio - * + * * GNU Radio is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3, or (at your option) * any later version. - * + * * GNU Radio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with GNU Radio; see the file COPYING. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, @@ -108,8 +108,8 @@ qtgui_sink_f::initialize() uint64_t maxBufferSize = 32768; d_main_gui = new SpectrumGUIClass(maxBufferSize, d_fftsize, - d_center_freq, - -d_bandwidth/2.0, + d_center_freq, + -d_bandwidth/2.0, d_bandwidth/2.0); d_main_gui->SetDisplayTitle(d_name); d_main_gui->SetFFTSize(d_fftsize); @@ -144,12 +144,12 @@ qtgui_sink_f::pyqwidget() } void -qtgui_sink_f::set_frequency_range(const double centerfreq, +qtgui_sink_f::set_frequency_range(const double centerfreq, const double bandwidth) { d_center_freq = centerfreq; d_bandwidth = bandwidth; - d_main_gui->SetFrequencyRange(d_center_freq, + d_main_gui->SetFrequencyRange(d_center_freq, -d_bandwidth/2.0, d_bandwidth/2.0); } @@ -167,7 +167,7 @@ qtgui_sink_f::set_constellation_axis(double xmin, double xmax, d_main_gui->SetConstellationAxis(xmin, xmax, ymin, ymax); } -void +void qtgui_sink_f::set_constellation_pen_size(int size) { d_main_gui->SetConstellationPenSize(size); @@ -200,14 +200,14 @@ qtgui_sink_f::fft(const float *data_in, int size) for (int i = 0; i < size; i++) // float to complex conversion dst[i] = data_in[i]; } - + d_fft->execute (); // compute the fft } -void +void qtgui_sink_f::windowreset() { - gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); + gr_firdes::win_type newwintype = (gr_firdes::win_type)d_main_gui->GetWindowType(); if(d_wintype != newwintype) { d_wintype = newwintype; buildwindow(); @@ -234,11 +234,11 @@ qtgui_sink_f::fftresize() delete [] d_residbuf; d_residbuf = new float[newfftsize]; - // Set new fft size and reset buffer index - // (throws away any currently held data, but who cares?) + // Set new fft size and reset buffer index + // (throws away any currently held data, but who cares?) d_fftsize = newfftsize; d_index = 0; - + // Reset window to reflect new size buildwindow(); @@ -269,14 +269,14 @@ qtgui_sink_f::general_work (int noutput_items, // If we have enough input for one full FFT, do it if(datasize >= resid) { const gruel::high_res_timer_type currentTime = gruel::high_res_timer_now(); - + // Fill up residbuf with d_fftsize number of items memcpy(d_residbuf+d_index, &in[j], sizeof(float)*resid); d_index = 0; j += resid; fft(d_residbuf, d_fftsize); - + d_main_gui->UpdateWindow(true, d_fft->get_outbuf(), d_fftsize, (float*)d_residbuf, d_fftsize, NULL, 0, currentTime, true); @@ -286,7 +286,7 @@ qtgui_sink_f::general_work (int noutput_items, memcpy(d_residbuf+d_index, &in[j], sizeof(float)*datasize); d_index += datasize; j += datasize; - } + } } consume_each(j); |