summaryrefslogtreecommitdiff
path: root/gr-qtgui/src/lib/spectrumUpdateEvents.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/src/lib/spectrumUpdateEvents.cc')
-rw-r--r--gr-qtgui/src/lib/spectrumUpdateEvents.cc27
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
{