Spectrum markers: moved to sdrbase

pull/983/head
f4exb 2021-08-07 19:45:48 +02:00
rodzic 885bfb823f
commit ab314c814d
10 zmienionych plików z 16 dodań i 11 usunięć

Wyświetl plik

@ -149,6 +149,7 @@ set(sdrbase_SOURCES
dsp/devicesamplesink.cpp
dsp/devicesamplemimo.cpp
dsp/devicesamplestatic.cpp
dsp/spectrummarkers.cpp
dsp/spectrumvis.cpp
dsp/wavfilerecord.cpp
@ -299,6 +300,7 @@ set(sdrbase_HEADERS
dsp/gfft.h
dsp/glscopesettings.h
dsp/glspectruminterface.h
dsp/spectrummarkers.h
dsp/spectrumsettings.h
dsp/goertzel.h
dsp/hbfilterchainconverter.h

Wyświetl plik

@ -48,8 +48,12 @@ bool SpectrumHistogramMarker::deserialize(const QByteArray& data)
if (d.getVersion() == 1)
{
int tmp;
d.readFloat(1, &m_frequency, 0);
d.readFloat(2, &m_power, 0);
d.readS32(3, &tmp, 0);
m_markerType = (SpectrumMarkerType) tmp;
int r, g, b;
d.readS32(4, &r, 255);
d.readS32(5, &g, 255);

Wyświetl plik

@ -27,7 +27,7 @@
#include "export.h"
struct SDRGUI_API SpectrumHistogramMarker
struct SDRBASE_API SpectrumHistogramMarker
{
enum SpectrumMarkerType
{
@ -104,7 +104,7 @@ struct SDRGUI_API SpectrumHistogramMarker
bool deserialize(const QByteArray& data);
};
struct SDRGUI_API SpectrumWaterfallMarker
struct SDRBASE_API SpectrumWaterfallMarker
{
QPointF m_point;
float m_frequency;

Wyświetl plik

@ -66,7 +66,6 @@ QByteArray SpectrumSettings::serialize() const
s.writeS32(3, (int) m_fftWindow);
s.writeReal(4, m_refLevel);
s.writeReal(5, m_powerRange);
s.writeS32(26, m_fpsPeriodMs);
s.writeBool(6, m_displayWaterfall);
s.writeBool(7, m_invertedWaterfall);
s.writeBool(8, m_displayMaxHold);
@ -86,6 +85,7 @@ QByteArray SpectrumSettings::serialize() const
s.writeU32(23, m_wsSpectrumPort);
s.writeBool(24, m_ssb);
s.writeBool(25, m_usb);
s.writeS32(26, m_fpsPeriodMs);
return s.final();
}
@ -110,8 +110,6 @@ bool SpectrumSettings::deserialize(const QByteArray& data)
m_fftWindow = (FFTWindow::Function) tmp;
d.readReal(4, &m_refLevel, 0);
d.readReal(5, &m_powerRange, 100);
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);
@ -135,6 +133,8 @@ bool SpectrumSettings::deserialize(const QByteArray& data)
m_wsSpectrumPort = utmp < 1024 ? 1024 : utmp > 65535 ? 65535 : utmp;
d.readBool(24, &m_ssb, false);
d.readBool(25, &m_usb, true);
d.readS32(26, &tmp, 50);
m_fpsPeriodMs = tmp < 5 ? 5 : tmp > 500 ? 500 : tmp;
return true;
}

Wyświetl plik

@ -24,6 +24,7 @@
#include "export.h"
#include "dsp/dsptypes.h"
#include "dsp/fftwindow.h"
#include "dsp/spectrummarkers.h"
#include "settings/serializable.h"
class SDRBASE_API SpectrumSettings : public Serializable

Wyświetl plik

@ -59,7 +59,6 @@ set(sdrgui_SOURCES
gui/scaleengine.cpp
gui/scaledimage.cpp
gui/sdrangelsplash.cpp
gui/spectrummarkers.cpp
gui/spectrummarkersdialog.cpp
gui/tickedslider.cpp
gui/transverterbutton.cpp
@ -149,7 +148,6 @@ set(sdrgui_HEADERS
gui/scaleengine.h
gui/scaledimage.h
gui/sdrangelsplash.h
gui/spectrummarkers.h
gui/spectrummarkersdialog.h
gui/tickedslider.h
gui/transverterbutton.h

Wyświetl plik

@ -2090,6 +2090,7 @@ void GLSpectrum::updateHistogramMarkers()
m_histogramMarkers[i].m_fftBin = m_histogramMarkers[i].m_fftBin < 0 ?
0 : m_histogramMarkers[i].m_fftBin > m_fftSize - 1 ?
m_fftSize - 1 : m_histogramMarkers[i].m_fftBin;
qDebug("GLSpectrum::updateHistogramMarkers: %d: m_fftBin: %d", i, m_histogramMarkers[i].m_fftBin);
m_histogramMarkers[i].m_frequencyStr = displayScaled(
m_histogramMarkers[i].m_frequency,
'f',

Wyświetl plik

@ -28,11 +28,11 @@
#include <QOpenGLVertexArrayObject>
#include <QMatrix4x4>
#include <QGLWidget>
#include "dsp/glspectruminterface.h"
#include "gui/scaleengine.h"
#include "gui/glshadersimple.h"
#include "gui/glshadertextured.h"
#include "gui/spectrummarkers.h"
#include "dsp/glspectruminterface.h"
#include "dsp/spectrummarkers.h"
#include "dsp/channelmarker.h"
#include "dsp/spectrumsettings.h"
#include "export.h"

Wyświetl plik

@ -92,7 +92,6 @@ void GLSpectrumGUI::resetToDefaults()
QByteArray GLSpectrumGUI::serialize() const
{
qDebug("GLSpectrumGUI::serialize: %p", m_glSpectrum);
return m_settings.serialize();
}

Wyświetl plik

@ -23,7 +23,7 @@
#include <QList>
#include "dsp/spectrumsettings.h"
#include "gui/spectrummarkers.h"
#include "dsp/spectrummarkers.h"
#include "export.h"
namespace Ui {