SpectrumVis: removed message queue parameter from configure method

This commit is contained in:
f4exb 2020-05-01 02:23:26 +02:00
parent 79b670d919
commit 7d6d351891
6 changed files with 58 additions and 55 deletions

View File

@ -397,15 +397,15 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
ui->glSpectrum->setDisplayMaxHold(false); ui->glSpectrum->setDisplayMaxHold(false);
ui->glSpectrum->setSsbSpectrum(true); ui->glSpectrum->setSsbSpectrum(true);
m_spectrumVis->configure( m_spectrumVis->configure(
m_spectrumVis->getInputMessageQueue(), 64, // FFT size
64, // FFT size 0, // Ref level (dB)
0, // Ref level (dB) 100, // Power range (dB)
100, // Power range (dB) 10, // overlapping %
10, // overlapping % 0, // number of averaging samples
0, // number of averaging samples SpectrumVis::AvgModeNone, // no averaging
SpectrumVis::AvgModeNone, // no averaging FFTWindow::BlackmanHarris,
FFTWindow::BlackmanHarris, false // logarithmic scale
false); // logarithmic scale );
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
m_channelMarker.blockSignals(true); m_channelMarker.blockSignals(true);

View File

@ -187,15 +187,16 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
ui->glSpectrum->setSampleRate(ui->sampleRate->text().toInt()); ui->glSpectrum->setSampleRate(ui->sampleRate->text().toInt());
ui->glSpectrum->setDisplayWaterfall(true); ui->glSpectrum->setDisplayWaterfall(true);
ui->glSpectrum->setDisplayMaxHold(true); ui->glSpectrum->setDisplayMaxHold(true);
m_spectrumVis->configure(m_spectrumVis->getInputMessageQueue(), m_spectrumVis->configure(
64, // FFT size 64, // FFT size
0, // Ref level (dB) 0, // Ref level (dB)
100, // Power range (dB) 100, // Power range (dB)
10, // overlapping % 10, // overlapping %
0, // number of averaging samples 0, // number of averaging samples
SpectrumVis::AvgModeNone, // no averaging SpectrumVis::AvgModeNone, // no averaging
FFTWindow::BlackmanHarris, FFTWindow::BlackmanHarris,
false); // logarithmic scale false // logarithmic scale
);
ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer()); ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer());
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));

View File

@ -144,15 +144,16 @@ UDPSourceGUI::UDPSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
ui->glSpectrum->setSampleRate(ui->sampleRate->text().toInt()); ui->glSpectrum->setSampleRate(ui->sampleRate->text().toInt());
ui->glSpectrum->setDisplayWaterfall(true); ui->glSpectrum->setDisplayWaterfall(true);
ui->glSpectrum->setDisplayMaxHold(true); ui->glSpectrum->setDisplayMaxHold(true);
m_spectrumVis->configure(m_spectrumVis->getInputMessageQueue(), m_spectrumVis->configure(
64, // FFT size 64, // FFT size
0, // Ref level (dB) 0, // Ref level (dB)
100, // Power range (dB) 100, // Power range (dB)
10, // overlapping % 10, // overlapping %
0, // number of averaging samples 0, // number of averaging samples
SpectrumVis::AvgModeNone, // no averaging SpectrumVis::AvgModeNone, // no averaging
FFTWindow::BlackmanHarris, FFTWindow::BlackmanHarris,
false); // logarithmic scale false // logarithmic scale
);
ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer()); ui->glSpectrum->connectTimer(MainWindow::getInstance()->getMasterTimer());
connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));

View File

@ -81,15 +81,15 @@ void SpectrumVis::closeWSSpectrum()
getInputMessageQueue()->push(cmd); getInputMessageQueue()->push(cmd);
} }
void SpectrumVis::configure(MessageQueue* msgQueue, void SpectrumVis::configure(
int fftSize, int fftSize,
float refLevel, float refLevel,
float powerRange, float powerRange,
int overlapPercent, int overlapPercent,
unsigned int averagingNb, unsigned int averagingNb,
AvgMode averagingMode, AvgMode averagingMode,
FFTWindow::Function window, FFTWindow::Function window,
bool linear) bool linear)
{ {
GLSpectrumSettings settings = m_settings; GLSpectrumSettings settings = m_settings;
settings.m_fftSize = fftSize; settings.m_fftSize = fftSize;
@ -103,7 +103,7 @@ void SpectrumVis::configure(MessageQueue* msgQueue,
MsgConfigureSpectrumVis* cmd = MsgConfigureSpectrumVis::create(settings, false); MsgConfigureSpectrumVis* cmd = MsgConfigureSpectrumVis::create(settings, false);
msgQueue->push(cmd); getInputMessageQueue()->push(cmd);
} }
void SpectrumVis::setScalef(Real scalef) void SpectrumVis::setScalef(Real scalef)

View File

@ -78,15 +78,16 @@ public:
void openWSSpectrum(); void openWSSpectrum();
void closeWSSpectrum(); void closeWSSpectrum();
void configure(MessageQueue* msgQueue, void configure(
int fftSize, int fftSize,
float refLevel, float refLevel,
float powerRange, float powerRange,
int overlapPercent, int overlapPercent,
unsigned int averagingNb, unsigned int averagingNb,
AvgMode averagingMode, AvgMode averagingMode,
FFTWindow::Function window, FFTWindow::Function window,
bool m_linear); bool m_linear
);
void setScalef(Real scalef); void setScalef(Real scalef);
void configureWSSpectrum(const QString& address, uint16_t port); void configureWSSpectrum(const QString& address, uint16_t port);

View File

@ -229,15 +229,15 @@ void GLSpectrumGUI::applySettingsVis()
if (m_spectrumVis) if (m_spectrumVis)
{ {
m_spectrumVis->configure(m_messageQueueToVis, m_spectrumVis->configure(
m_fftSize, m_fftSize,
m_refLevel, m_refLevel,
m_powerRange, m_powerRange,
m_fftOverlap, m_fftOverlap,
m_averagingNb, m_averagingNb,
(SpectrumVis::AvgMode) m_averagingMode, (SpectrumVis::AvgMode) m_averagingMode,
(FFTWindow::Function) m_fftWindow, (FFTWindow::Function) m_fftWindow,
m_linear m_linear
); );
} }