1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Spectrum: removed FPS 'no limit' setting. Fixes #793

This commit is contained in:
f4exb 2021-03-07 11:54:16 +01:00
parent 806e6cac69
commit 01170eb724
5 changed files with 15 additions and 28 deletions

View File

@ -110,7 +110,8 @@ bool GLSpectrumSettings::deserialize(const QByteArray& data)
m_fftWindow = (FFTWindow::Function) tmp;
d.readReal(4, &m_refLevel, 0);
d.readReal(5, &m_powerRange, 100);
d.readS32(26, &m_fpsPeriodMs, 50);
d.readS32(26, &tmp, 50);
m_fpsPeriodMs = tmp < 5 ? 5 : tmp > 500 ? 500 : tmp;
d.readBool(6, &m_displayWaterfall, true);
d.readBool(7, &m_invertedWaterfall, true);
d.readBool(8, &m_displayMaxHold, false);

View File

@ -370,8 +370,10 @@ void WebAPIAdapterBase::webapiUpdatePreset(
if (spectrumIt->contains("refLevel")) {
spectrumSettings.m_refLevel = apiPreset->getSpectrumConfig()->getRefLevel();
}
if (spectrumIt->contains("fpsPeriodMs")) {
spectrumSettings.m_fpsPeriodMs = apiPreset->getSpectrumConfig()->getFpsPeriodMs();
if (spectrumIt->contains("fpsPeriodMs"))
{
qint32 fpsPeriodMs = apiPreset->getSpectrumConfig()->getFpsPeriodMs();
spectrumSettings.m_fpsPeriodMs = fpsPeriodMs < 5 ? 5 : fpsPeriodMs > 500 ? 500 : fpsPeriodMs;
}
if (spectrumIt->contains("waterfallShare")) {
spectrumSettings.m_waterfallShare = apiPreset->getSpectrumConfig()->getWaterfallShare();

View File

@ -440,10 +440,6 @@ void GLSpectrum::newSpectrum(const Real *spectrum, int nbBins, int fftSize)
updateWaterfall(spectrum);
updateHistogram(spectrum);
if (m_fpsPeriodMs == 0) {
update();
}
}
void GLSpectrum::updateWaterfall(const Real *spectrum)

View File

@ -32,7 +32,7 @@
#include "util/db.h"
#include "ui_glspectrumgui.h"
const int GLSpectrumGUI::m_fpsMs[] = {500, 200, 100, 50, 20, 10, 5, 0};
const int GLSpectrumGUI::m_fpsMs[] = {500, 200, 100, 50, 20, 10, 5};
GLSpectrumGUI::GLSpectrumGUI(QWidget* parent) :
QWidget(parent),
@ -147,12 +147,6 @@ void GLSpectrumGUI::displaySettings()
}
}
if (m_settings.m_fpsPeriodMs == 0)
{
ui->fps->setCurrentIndex(sizeof(m_fpsMs)/sizeof(m_fpsMs[0]) - 1);
}
else
{
unsigned int i = 0;
for (; i < sizeof(m_fpsMs)/sizeof(m_fpsMs[0]); i++)
@ -163,7 +157,6 @@ void GLSpectrumGUI::displaySettings()
}
ui->fps->setCurrentIndex(i);
}
ui->fftOverlap->setValue(m_settings.m_fftOverlap);
setMaximumOverlap();

View File

@ -461,7 +461,7 @@
<string>Spectrum maximum FPS (NL for No Limit)</string>
</property>
<property name="currentIndex">
<number>3</number>
<number>0</number>
</property>
<item>
<property name="text">
@ -498,11 +498,6 @@
<string>200</string>
</property>
</item>
<item>
<property name="text">
<string>NL</string>
</property>
</item>
</widget>
</item>
<item>