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

pull/803/head
f4exb 2021-03-07 11:54:16 +01:00
rodzic 806e6cac69
commit 01170eb724
5 zmienionych plików z 15 dodań i 28 usunięć

Wyświetl plik

@ -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);

Wyświetl plik

@ -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();

Wyświetl plik

@ -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)

Wyświetl plik

@ -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,24 +147,17 @@ 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;
unsigned int i = 0;
for (; i < sizeof(m_fpsMs)/sizeof(m_fpsMs[0]); i++)
{
if (m_settings.m_fpsPeriodMs >= m_fpsMs[i]) {
break;
}
for (; i < sizeof(m_fpsMs)/sizeof(m_fpsMs[0]); i++)
{
if (m_settings.m_fpsPeriodMs >= m_fpsMs[i]) {
break;
}
ui->fps->setCurrentIndex(i);
}
ui->fps->setCurrentIndex(i);
ui->fftOverlap->setValue(m_settings.m_fftOverlap);
setMaximumOverlap();
ui->averaging->setCurrentIndex(m_settings.m_averagingIndex);

Wyświetl plik

@ -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>