mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
Fixed GLSpectrumSettings
This commit is contained in:
parent
4d9d804f97
commit
84e44a0948
@ -15,7 +15,6 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "fftwindow.h"
|
||||
#include "util/simpleserializer.h"
|
||||
#include "glspectrumsettings.h"
|
||||
|
||||
@ -56,7 +55,7 @@ QByteArray GLSpectrumSettings::serialize() const
|
||||
|
||||
s.writeS32(1, m_fftSize);
|
||||
s.writeS32(2, m_fftOverlap);
|
||||
s.writeS32(3, m_fftWindow);
|
||||
s.writeS32(3, (int) m_fftWindow);
|
||||
s.writeReal(4, m_refLevel);
|
||||
s.writeReal(5, m_powerRange);
|
||||
s.writeBool(6, m_displayWaterfall);
|
||||
@ -94,7 +93,8 @@ bool GLSpectrumSettings::deserialize(const QByteArray& data)
|
||||
{
|
||||
d.readS32(1, &m_fftSize, 1024);
|
||||
d.readS32(2, &m_fftOverlap, 0);
|
||||
d.readS32(3, &m_fftWindow, FFTWindow::Hanning);
|
||||
d.readS32(3, &tmp, (int) FFTWindow::Hanning);
|
||||
m_fftWindow = (FFTWindow::Function) tmp;
|
||||
d.readReal(4, &m_refLevel, 0);
|
||||
d.readReal(5, &m_powerRange, 100);
|
||||
d.readBool(6, &m_displayWaterfall, true);
|
||||
|
@ -15,10 +15,14 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SDRBASE_DSP_GLSPECTRUMSETTNGS_H
|
||||
#define SDRBASE_DSP_GLSPECTRUMSETTNGS_H
|
||||
|
||||
#include <QByteArray>
|
||||
|
||||
#include "export.h"
|
||||
#include "dsp/dsptypes.h"
|
||||
#include "dsp/fftwindow.h"
|
||||
#include "settings/serializable.h"
|
||||
|
||||
class SDRBASE_API GLSpectrumSettings : public Serializable
|
||||
@ -34,7 +38,7 @@ public:
|
||||
|
||||
int m_fftSize;
|
||||
int m_fftOverlap;
|
||||
int m_fftWindow;
|
||||
FFTWindow::Function m_fftWindow;
|
||||
Real m_refLevel;
|
||||
Real m_powerRange;
|
||||
int m_decay;
|
||||
@ -67,3 +71,5 @@ public:
|
||||
static int getAveragingValue(int averagingIndex, AveragingMode averagingMode);
|
||||
static int getAveragingIndex(int averagingValue, AveragingMode averagingMode);
|
||||
};
|
||||
|
||||
#endif // SDRBASE_DSP_GLSPECTRUMSETTNGS_H
|
||||
|
@ -259,7 +259,7 @@ void WebAPIAdapterBase::webapiUpdatePreset(
|
||||
spectrumSettings.m_fftSize = apiPreset->getSpectrumConfig()->getFftSize();
|
||||
}
|
||||
if (spectrumIt->contains("fftWindow")) {
|
||||
spectrumSettings.m_fftWindow = apiPreset->getSpectrumConfig()->getFftWindow();
|
||||
spectrumSettings.m_fftWindow = (FFTWindow::Function) apiPreset->getSpectrumConfig()->getFftWindow();
|
||||
}
|
||||
if (spectrumIt->contains("histogramStroke")) {
|
||||
spectrumSettings.m_histogramStroke = apiPreset->getSpectrumConfig()->getHistogramStroke();
|
||||
|
Loading…
Reference in New Issue
Block a user