mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Spectrum: increase maximum FFT size to 32k and set tooltip with bin size value
This commit is contained in:
parent
e9f11e1d37
commit
05bb5a148d
@ -64,7 +64,7 @@ public:
|
||||
QString m_wsSpectrumAddress;
|
||||
uint16_t m_wsSpectrumPort;
|
||||
static const int m_log2FFTSizeMin = 6; // 64
|
||||
static const int m_log2FFTSizeMax = 13; // 8k
|
||||
static const int m_log2FFTSizeMax = 15; // 32k
|
||||
|
||||
SpectrumSettings();
|
||||
virtual ~SpectrumSettings();
|
||||
|
@ -148,6 +148,7 @@ void GLSpectrumGUI::displaySettings()
|
||||
}
|
||||
}
|
||||
|
||||
setFFTSizeToolitp();
|
||||
unsigned int i = 0;
|
||||
|
||||
for (; i < sizeof(m_fpsMs)/sizeof(m_fpsMs[0]); i++)
|
||||
@ -242,6 +243,7 @@ void GLSpectrumGUI::on_fftSize_currentIndexChanged(int index)
|
||||
setMaximumOverlap();
|
||||
applySettings();
|
||||
setAveragingToolitp();
|
||||
setFFTSizeToolitp();
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::on_fftOverlap_valueChanged(int value)
|
||||
@ -524,6 +526,20 @@ void GLSpectrumGUI::setAveragingToolitp()
|
||||
}
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::setFFTSizeToolitp()
|
||||
{
|
||||
if (m_glSpectrum)
|
||||
{
|
||||
QString s;
|
||||
setNumberStr((float) m_glSpectrum->getSampleRate() / m_settings.m_fftSize, 2, s);
|
||||
ui->fftSize->setToolTip(QString("FFT size (resolution: %1Hz)").arg(s));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->fftSize->setToolTip(QString("FFT size"));
|
||||
}
|
||||
}
|
||||
|
||||
void GLSpectrumGUI::setFFTSize(int log2FFTSize)
|
||||
{
|
||||
ui->fftSize->setCurrentIndex(
|
||||
@ -553,6 +569,7 @@ bool GLSpectrumGUI::handleMessage(const Message& message)
|
||||
if (GLSpectrum::MsgReportSampleRate::match(message))
|
||||
{
|
||||
setAveragingToolitp();
|
||||
setFFTSizeToolitp();
|
||||
return true;
|
||||
}
|
||||
else if (SpectrumVis::MsgConfigureSpectrumVis::match(message))
|
||||
|
@ -77,6 +77,7 @@ private:
|
||||
void setNumberStr(int n, QString& s);
|
||||
void setNumberStr(float v, int decimalPlaces, QString& s);
|
||||
void setAveragingToolitp();
|
||||
void setFFTSizeToolitp();
|
||||
void setMaximumOverlap();
|
||||
bool handleMessage(const Message& message);
|
||||
|
||||
|
@ -50,7 +50,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<width>70</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -169,6 +169,16 @@
|
||||
<string>8k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>32k</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user