diff options
author | Tom Rondeau | 2010-05-11 21:19:15 -0400 |
---|---|---|
committer | Tom Rondeau | 2010-05-11 21:19:15 -0400 |
commit | 39cb5b8daee27ccca4d1919706910ccff116f45d (patch) | |
tree | d7c9287167e514f4411c5708bd2813a85418722e /gr-qtgui/src/lib/spectrumUpdateEvents.cc | |
parent | 1fc7c57f778a9f05ded1d216247242ee13632d03 (diff) | |
parent | 55364771aee8933ded7e98bd3c873d767f717cec (diff) | |
download | gnuradio-39cb5b8daee27ccca4d1919706910ccff116f45d.tar.gz gnuradio-39cb5b8daee27ccca4d1919706910ccff116f45d.tar.bz2 gnuradio-39cb5b8daee27ccca4d1919706910ccff116f45d.zip |
Merge branch 'qtupdate'
Diffstat (limited to 'gr-qtgui/src/lib/spectrumUpdateEvents.cc')
-rw-r--r-- | gr-qtgui/src/lib/spectrumUpdateEvents.cc | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gr-qtgui/src/lib/spectrumUpdateEvents.cc b/gr-qtgui/src/lib/spectrumUpdateEvents.cc index 2da37d350..53a205fb7 100644 --- a/gr-qtgui/src/lib/spectrumUpdateEvents.cc +++ b/gr-qtgui/src/lib/spectrumUpdateEvents.cc @@ -8,7 +8,6 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints, const double* realTimeDomainPoints, const double* imagTimeDomainPoints, const uint64_t numTimeDomainDataPoints, - const double timePerFFT, const timespec dataTimestamp, const bool repeatDataFlag, const bool lastOfMultipleUpdateFlag, @@ -16,15 +15,19 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints, const int droppedFFTFrames) : QEvent(QEvent::Type(10005)) { - _numFFTDataPoints = numFFTDataPoints; - if(_numFFTDataPoints < 1){ + if(numFFTDataPoints < 1) { _numFFTDataPoints = 1; } + else { + _numFFTDataPoints = numFFTDataPoints; + } - _numTimeDomainDataPoints = numTimeDomainDataPoints; - if(_numTimeDomainDataPoints < 1){ + if(numTimeDomainDataPoints < 1) { _numTimeDomainDataPoints = 1; } + else { + _numTimeDomainDataPoints = numTimeDomainDataPoints; + } _fftPoints = new std::complex<float>[_numFFTDataPoints]; _fftPoints[0] = std::complex<float>(0,0); @@ -32,26 +35,26 @@ SpectrumUpdateEvent::SpectrumUpdateEvent(const std::complex<float>* fftPoints, _realDataTimeDomainPoints = new double[_numTimeDomainDataPoints]; memset(_realDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double)); - if(numTimeDomainDataPoints > 0){ + if(numTimeDomainDataPoints > 0) { memcpy(_realDataTimeDomainPoints, realTimeDomainPoints, numTimeDomainDataPoints*sizeof(double)); } _imagDataTimeDomainPoints = new double[_numTimeDomainDataPoints]; memset(_imagDataTimeDomainPoints, 0x0, _numTimeDomainDataPoints*sizeof(double)); - if(numTimeDomainDataPoints > 0){ + if(numTimeDomainDataPoints > 0) { memcpy(_imagDataTimeDomainPoints, imagTimeDomainPoints, numTimeDomainDataPoints*sizeof(double)); } _dataTimestamp = dataTimestamp; - _timePerFFT = timePerFFT; _repeatDataFlag = repeatDataFlag; _lastOfMultipleUpdateFlag = lastOfMultipleUpdateFlag; _eventGeneratedTimestamp = generatedTimestamp; _droppedFFTFrames = droppedFFTFrames; } -SpectrumUpdateEvent::~SpectrumUpdateEvent(){ +SpectrumUpdateEvent::~SpectrumUpdateEvent() +{ delete[] _fftPoints; delete[] _realDataTimeDomainPoints; delete[] _imagDataTimeDomainPoints; @@ -87,12 +90,6 @@ SpectrumUpdateEvent::getNumTimeDomainDataPoints() const return _numTimeDomainDataPoints; } -double -SpectrumUpdateEvent::getTimePerFFT() const -{ - return _timePerFFT; -} - timespec SpectrumUpdateEvent::getDataTimestamp() const { |