Make rollup state a serializable object so that it can be dumped in JSON format for the API. Prerequisite tp #1050

pull/1108/head
f4exb 2022-01-09 05:27:12 +01:00
rodzic e2fc5aa87c
commit 98b305f320
599 zmienionych plików z 6183 dodań i 640 usunięć

Wyświetl plik

@ -327,6 +327,9 @@ void BeamSteeringCWMod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getRollupState());
}
}
void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const BeamSteeringCWModSettings& settings)
@ -367,6 +370,20 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getBeamSteeringCwModSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getBeamSteeringCwModSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getBeamSteeringCwModSettings()->setRollupState(swgRollupState);
}
}
}
void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force)
@ -454,6 +471,13 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgBeamSteeringCWSettings->setRollupState(swgRollupState);
}
}
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -119,6 +119,7 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -168,7 +169,7 @@ void BeamSteeringCWModGUI::displaySettings()
ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
applyInterpolation();
ui->steeringDegreesText->setText(tr("%1").arg(m_settings.m_steerDegrees));
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}
@ -211,7 +212,7 @@ void BeamSteeringCWModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -25,6 +25,7 @@
#include "dsp/channelmarker.h"
#include "channel/channelgui.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "beamsteeringcwmodsettings.h"
@ -53,6 +54,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
BeamSteeringCWModSettings m_settings;
int m_basebandSampleRate;
qint64 m_centerFrequency;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor BeamSteeringCWModPlugin::m_pluginDescriptor = {
BeamSteeringCWMod::m_channelId,
QStringLiteral("BeamSteeringCWMod"),
QStringLiteral("6.0.0"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -37,6 +37,7 @@ void BeamSteeringCWModSettings::resetToDefaults()
m_filterChainHash = 0;
m_channelOutput = 0;
m_channelMarker = nullptr;
m_rollupState = nullptr;
m_useReverseAPI = false;
m_reverseAPIAddress = "127.0.0.1";
m_reverseAPIPort = 8888;
@ -58,7 +59,10 @@ QByteArray BeamSteeringCWModSettings::serialize() const
s.writeU32(12, m_log2Interp);
s.writeU32(13, m_filterChainHash);
s.writeS32(14, m_channelOutput);
s.writeBlob(15, m_rollupState);
if (m_rollupState) {
s.writeBlob(15, m_rollupState->serialize());
}
return s.final();
}
@ -78,6 +82,7 @@ bool BeamSteeringCWModSettings::deserialize(const QByteArray& data)
uint32_t tmp;
int stmp;
QString strtmp;
QByteArray bytetmp;
d.readS32(1, &stmp, 90);
m_steerDegrees = stmp < 0 ? -0 : stmp > 180 ? 180 : stmp;
@ -102,7 +107,12 @@ bool BeamSteeringCWModSettings::deserialize(const QByteArray& data)
d.readU32(13, &m_filterChainHash, 0);
d.readS32(14, &stmp, 0);
m_channelOutput = stmp < 0 ? 0 : stmp > 2 ? 2 : stmp;
d.readBlob(15, &m_rollupState);
if (m_rollupState)
{
d.readBlob(15, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -38,11 +38,12 @@ struct BeamSteeringCWModSettings
uint16_t m_reverseAPIChannelIndex;
Serializable *m_channelMarker;
QByteArray m_rollupState;
Serializable *m_rollupState;
BeamSteeringCWModSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *RollupState) { m_rollupState = RollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};

Wyświetl plik

@ -351,6 +351,9 @@ void Interferometer::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getRollupState());
}
}
void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const InterferometerSettings& settings)
@ -418,6 +421,20 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
response.getInterferometerSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getInterferometerSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getInterferometerSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getInterferometerSettings()->setRollupState(swgRollupState);
}
}
}
void Interferometer::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force)
@ -516,6 +533,13 @@ void Interferometer::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgInterferometerSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgInterferometerSettings->setRollupState(swgRollupState);
}
}
void Interferometer::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -141,6 +141,7 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_settings.setScopeGUI(ui->scopeGUI);
m_settings.setSpectrumGUI(ui->spectrumGUI);
@ -201,7 +202,7 @@ void InterferometerGUI::displaySettings()
applyDecimation();
ui->phaseCorrection->setValue(m_settings.m_phase);
ui->phaseCorrectionText->setText(tr("%1").arg(m_settings.m_phase));
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}
@ -246,7 +247,7 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -22,6 +22,7 @@
#include "dsp/channelmarker.h"
#include "util/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "interferometersettings.h"
@ -52,6 +53,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
InterferometerSettings m_settings;
int m_sampleRate;
qint64 m_centerFrequency;

Wyświetl plik

@ -30,7 +30,7 @@
const PluginDescriptor InterferometerPlugin::m_pluginDescriptor = {
Interferometer::m_channelId,
QStringLiteral("Interferometer"),
QStringLiteral("6.15.0"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -26,7 +26,8 @@
InterferometerSettings::InterferometerSettings() :
m_channelMarker(nullptr),
m_spectrumGUI(nullptr),
m_scopeGUI(nullptr)
m_scopeGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -70,7 +71,9 @@ QByteArray InterferometerSettings::serialize() const
if (m_channelMarker) {
s.writeBlob(22, m_channelMarker->serialize());
}
s.writeBlob(23, m_rollupState);
if (m_rollupState) {
s.writeBlob(23, m_rollupState->serialize());
}
return s.final();
}
@ -115,21 +118,29 @@ bool InterferometerSettings::deserialize(const QByteArray& data)
d.readS32(12, &tmp, 0);
m_phase = tmp < -180 ? -180 : tmp > 180 ? 180 : tmp;
if (m_spectrumGUI) {
if (m_spectrumGUI)
{
d.readBlob(20, &bytetmp);
m_spectrumGUI->deserialize(bytetmp);
}
if (m_scopeGUI) {
if (m_scopeGUI)
{
d.readBlob(21, &bytetmp);
m_scopeGUI->deserialize(bytetmp);
}
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(22, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
d.readBlob(23, &m_rollupState);
if (m_rollupState)
{
d.readBlob(23, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}
@ -138,4 +149,4 @@ bool InterferometerSettings::deserialize(const QByteArray& data)
resetToDefaults();
return false;
}
}
}

Wyświetl plik

@ -52,10 +52,11 @@ struct InterferometerSettings
Serializable *m_channelMarker;
Serializable *m_spectrumGUI;
Serializable *m_scopeGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
InterferometerSettings();
void resetToDefaults();
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
void setScopeGUI(Serializable *scopeGUI) { m_scopeGUI = scopeGUI; }
@ -63,4 +64,4 @@ struct InterferometerSettings
bool deserialize(const QByteArray& data);
};
#endif // INCLUDE_INTERFEROMETERSETTINGS_H
#endif // INCLUDE_INTERFEROMETERSETTINGS_H

Wyświetl plik

@ -311,6 +311,9 @@ void ChannelAnalyzer::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChannelAnalyzerSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getChannelAnalyzerSettings()->getRollupState());
}
}
void ChannelAnalyzer::webapiFormatChannelSettings(
@ -397,6 +400,20 @@ void ChannelAnalyzer::webapiFormatChannelSettings(
response.getChannelAnalyzerSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getChannelAnalyzerSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getChannelAnalyzerSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getChannelAnalyzerSettings()->setRollupState(swgRollupState);
}
}
}
void ChannelAnalyzer::webapiReverseSendSettings(
@ -562,6 +579,13 @@ void ChannelAnalyzer::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgChannelAnalyzerSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgChannelAnalyzerSettings->setRollupState(swgRollupState);
}
}
void ChannelAnalyzer::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -97,7 +97,7 @@ void ChannelAnalyzerGUI::displaySettings()
QString rolloffStr = QString::number(m_settings.m_rrcRolloff/100.0, 'f', 2);
ui->rrcRolloffText->setText(rolloffStr);
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}
@ -450,7 +450,7 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -536,6 +536,7 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
ui->scopeGUI->setBuddies(m_scopeVis->getInputMessageQueue(), m_scopeVis, ui->glScope);
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_settings.setSpectrumGUI(ui->spectrumGUI);
m_settings.setScopeGUI(ui->scopeGUI);

Wyświetl plik

@ -23,6 +23,7 @@
#include "dsp/dsptypes.h"
#include "util/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "chanalyzersettings.h"
@ -58,6 +59,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
ChannelAnalyzerSettings m_settings;
bool m_doApplySettings;
int m_basebandSampleRate; //!< sample rate after final in-channel decimation (spanlog2)

Wyświetl plik

@ -26,7 +26,7 @@
const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = {
ChannelAnalyzer::m_channelId,
QStringLiteral("Channel Analyzer"),
QStringLiteral("6.17.3"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -24,9 +24,10 @@
#include "chanalyzersettings.h"
ChannelAnalyzerSettings::ChannelAnalyzerSettings() :
m_channelMarker(0),
m_spectrumGUI(0),
m_scopeGUI(0)
m_channelMarker(nullptr),
m_spectrumGUI(nullptr),
m_scopeGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -66,12 +67,20 @@ QByteArray ChannelAnalyzerSettings::serialize() const
s.writeS32(1, m_inputFrequencyOffset);
s.writeS32(2, m_bandwidth);
s.writeBlob(3, m_spectrumGUI->serialize());
if (m_spectrumGUI) {
s.writeBlob(3, m_spectrumGUI->serialize());
}
s.writeU32(4, m_rgbColor);
s.writeS32(5, m_lowCutoff);
s.writeS32(6, m_log2Decim);
s.writeBool(7, m_ssb);
s.writeBlob(8, m_scopeGUI->serialize());
if (m_scopeGUI) {
s.writeBlob(8, m_scopeGUI->serialize());
}
s.writeBool(9, m_rationalDownSample);
s.writeU32(10, m_rationalDownSamplerRate);
s.writeBool(11, m_pll);
@ -85,7 +94,11 @@ QByteArray ChannelAnalyzerSettings::serialize() const
s.writeFloat(19, m_pllDampingFactor);
s.writeFloat(20, m_pllLoopGain);
s.writeBool(21, m_costasLoop);
s.writeBlob(22, m_rollupState);
if (m_rollupState) {
s.writeBlob(22, m_rollupState->serialize());
}
s.writeBool(23, m_useReverseAPI);
s.writeString(24, m_reverseAPIAddress);
s.writeU32(25, m_reverseAPIPort);
@ -144,7 +157,13 @@ bool ChannelAnalyzerSettings::deserialize(const QByteArray& data)
d.readFloat(19, &m_pllDampingFactor, 0.5f);
d.readFloat(20, &m_pllLoopGain, 10.0f);
d.readBool(21, &m_costasLoop, false);
d.readBlob(22, &m_rollupState);
if (m_rollupState)
{
d.readBlob(22, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
d.readBool(18, &m_useReverseAPI, false);
d.readString(19, &m_reverseAPIAddress, "127.0.0.1");
d.readU32(20, &utmp, 0);

Wyświetl plik

@ -53,7 +53,7 @@ struct ChannelAnalyzerSettings
Serializable *m_channelMarker;
Serializable *m_spectrumGUI;
Serializable *m_scopeGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
int m_streamIndex; //!< MIMO channel. Not relevant when connected to SI (single Rx).
bool m_useReverseAPI;
QString m_reverseAPIAddress;
@ -64,6 +64,7 @@ struct ChannelAnalyzerSettings
ChannelAnalyzerSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
void setScopeGUI(Serializable *scopeGUI) { m_scopeGUI = scopeGUI; }
QByteArray serialize() const;

Wyświetl plik

@ -408,6 +408,9 @@ void ADSBDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAdsbDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getAdsbDemodSettings()->getRollupState());
}
}
int ADSBDemod::webapiReportGet(
@ -472,6 +475,20 @@ void ADSBDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getAdsbDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getAdsbDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getAdsbDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getAdsbDemodSettings()->setRollupState(swgRollupState);
}
}
}
void ADSBDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)

Wyświetl plik

@ -2010,7 +2010,7 @@ void ADSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -2572,6 +2572,7 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -2797,7 +2798,7 @@ void ADSBDemodGUI::displaySettings()
applyMapSettings();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -38,6 +38,7 @@
#include "util/flightinformation.h"
#include "util/openaip.h"
#include "util/planespotters.h"
#include "settings/rollupstate.h"
#include "maincore.h"
#include "adsbdemodsettings.h"
@ -665,6 +666,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
ADSBDemodSettings m_settings;
bool m_basicSettingsShown;
bool m_doApplySettings;

Wyświetl plik

@ -23,11 +23,13 @@
#include "dsp/dspengine.h"
#include "util/simpleserializer.h"
#include "settings/serializable.h"
#include "settings/rollupstate.h"
#include "adsbdemodsettings.h"
ADSBDemodSettings::ADSBDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -92,11 +94,12 @@ QByteArray ADSBDemodSettings::serialize() const
s.writeBool(6, m_feedEnabled);
s.writeString(7, m_feedHost);
s.writeU32(8, m_feedPort);
s.writeU32(9, m_rgbColor);
if (m_channelMarker) {
s.writeBlob(10, m_channelMarker->serialize());
}
s.writeString(11, m_title);
s.writeBool(12, m_useReverseAPI);
s.writeString(13, m_reverseAPIAddress);
@ -133,7 +136,10 @@ QByteArray ADSBDemodSettings::serialize() const
s.writeS32(40, (int)m_mapType);
s.writeBool(41, m_displayNavAids);
s.writeBool(42, m_displayPhotos);
s.writeBlob(43, m_rollupState);
if (m_rollupState) {
s.writeBlob(43, m_rollupState->serialize());
}
for (int i = 0; i < ADSBDEMOD_COLUMNS; i++) {
s.writeS32(100 + i, m_columnIndexes[i]);
@ -232,7 +238,12 @@ bool ADSBDemodSettings::deserialize(const QByteArray& data)
d.readS32(40, (int *)&m_mapType, (int)AVIATION_LIGHT);
d.readBool(41, &m_displayNavAids, true);
d.readBool(42, &m_displayPhotos, true);
d.readBlob(43, &m_rollupState);
if (m_rollupState)
{
d.readBlob(43, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
for (int i = 0; i < ADSBDEMOD_COLUMNS; i++) {
d.readS32(100 + i, &m_columnIndexes[i], i);

Wyświetl plik

@ -144,11 +144,12 @@ struct ADSBDemodSettings
} m_mapType;
bool m_displayNavAids;
bool m_displayPhotos;
QByteArray m_rollupState;
Serializable *m_rollupState;
ADSBDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
QByteArray serializeNotificationSettings(QList<NotificationSettings *> notificationSettings) const;

Wyświetl plik

@ -30,7 +30,7 @@
const PluginDescriptor ADSBPlugin::m_pluginDescriptor = {
ADSBDemod::m_channelId,
QStringLiteral("ADS-B Demodulator"),
QStringLiteral("6.17.5"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -483,6 +483,9 @@ void AISDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAisDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getAisDemodSettings()->getRollupState());
}
}
void AISDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const AISDemodSettings& settings)
@ -546,6 +549,20 @@ void AISDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getAisDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getAisDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getAisDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getAisDemodSettings()->setRollupState(swgRollupState);
}
}
}
void AISDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const AISDemodSettings& settings, bool force)

Wyświetl plik

@ -364,7 +364,7 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
}
}
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -478,6 +478,7 @@ AISDemodGUI::AISDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setScopeGUI(ui->scopeGUI);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -601,9 +602,10 @@ void AISDemodGUI::displaySettings()
ui->messages->setColumnWidth(i, m_settings.m_messageColumnSizes[i]);
header->moveSection(header->visualIndex(i), m_settings.m_messageColumnIndexes[i]);
}
filter();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -28,6 +28,7 @@
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "aisdemodsettings.h"
#include "aisdemod.h"
@ -67,6 +68,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
AISDemodSettings m_settings;
bool m_doApplySettings;
ScopeVis* m_scopeVis;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor AISDemodPlugin::m_pluginDescriptor = {
AISDemod::m_channelId,
QStringLiteral("AIS Demodulator"),
QStringLiteral("6.17.4"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -24,8 +24,9 @@
#include "aisdemodsettings.h"
AISDemodSettings::AISDemodSettings() :
m_channelMarker(0),
m_scopeGUI(0)
m_channelMarker(nullptr),
m_scopeGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -79,9 +80,11 @@ QByteArray AISDemodSettings::serialize() const
s.writeS32(11, m_scopeCh2);
s.writeU32(12, m_rgbColor);
s.writeString(13, m_title);
if (m_channelMarker) {
s.writeBlob(14, m_channelMarker->serialize());
}
s.writeS32(15, m_streamIndex);
s.writeBool(16, m_useReverseAPI);
s.writeString(17, m_reverseAPIAddress);
@ -92,7 +95,10 @@ QByteArray AISDemodSettings::serialize() const
s.writeString(22, m_logFilename);
s.writeBool(23, m_logEnabled);
s.writeS32(24, m_baud);
s.writeBlob(25, m_rollupState);
if (m_rollupState) {
s.writeBlob(25, m_rollupState->serialize());
}
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
s.writeS32(100 + i, m_messageColumnIndexes[i]);
@ -126,29 +132,36 @@ bool AISDemodSettings::deserialize(const QByteArray& data)
d.readBool(6, &m_udpEnabled);
d.readString(7, &m_udpAddress);
d.readU32(8, &utmp);
if ((utmp > 1023) && (utmp < 65535)) {
m_udpPort = utmp;
} else {
m_udpPort = 9999;
}
d.readS32(9, (int *)&m_udpFormat, (int)Binary);
d.readS32(10, &m_scopeCh1, 0);
d.readS32(11, &m_scopeCh2, 0);
d.readU32(12, &m_rgbColor, QColor(102, 0, 0).rgb());
d.readString(13, &m_title, "AIS Demodulator");
d.readBlob(14, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(14, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
d.readS32(15, &m_streamIndex, 0);
d.readBool(16, &m_useReverseAPI, false);
d.readString(17, &m_reverseAPIAddress, "127.0.0.1");
d.readU32(18, &utmp, 0);
if ((utmp > 1023) && (utmp < 65535)) {
m_reverseAPIPort = utmp;
} else {
m_reverseAPIPort = 8888;
}
d.readU32(19, &utmp, 0);
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
d.readU32(20, &utmp, 0);
@ -163,12 +176,20 @@ bool AISDemodSettings::deserialize(const QByteArray& data)
d.readString(22, &m_logFilename, "ais_log.csv");
d.readBool(23, &m_logEnabled, false);
d.readS32(24, &m_baud, 9600);
d.readBlob(25, &m_rollupState);
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
if (m_rollupState)
{
d.readBlob(25, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++) {
d.readS32(100 + i, &m_messageColumnIndexes[i], i);
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++)
}
for (int i = 0; i < AISDEMOD_MESSAGE_COLUMNS; i++) {
d.readS32(200 + i, &m_messageColumnSizes[i], -1);
}
return true;
}

Wyświetl plik

@ -60,7 +60,7 @@ struct AISDemodSettings
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
Serializable *m_scopeGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
int m_messageColumnIndexes[AISDEMOD_MESSAGE_COLUMNS];//!< How the columns are ordered in the table
int m_messageColumnSizes[AISDEMOD_MESSAGE_COLUMNS]; //!< Size of the columns in the table
@ -70,6 +70,7 @@ struct AISDemodSettings
AISDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setScopeGUI(Serializable *scopeGUI) { m_scopeGUI = scopeGUI; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

Wyświetl plik

@ -400,6 +400,9 @@ void AMDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAmDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getAmDemodSettings()->getRollupState());
}
}
int AMDemod::webapiReportGet(
@ -463,6 +466,20 @@ void AMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
response.getAmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getAmDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getAmDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getAmDemodSettings()->setRollupState(swgRollupState);
}
}
}
void AMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -583,6 +600,13 @@ void AMDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAMDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgAMDemodSettings->setRollupState(swgRollupState);
}
}
void AMDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -182,7 +182,7 @@ void AMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_nfmDemod->setSpectrum(m_threadedSampleSink->getMessageQueue(), rollDown);
*/
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -275,6 +275,7 @@ AMDemodGUI::AMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -372,7 +373,7 @@ void AMDemodGUI::displaySettings()
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -7,6 +7,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "amdemodsettings.h"
class PluginAPI;
@ -40,6 +41,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
AMDemodSettings m_settings;
bool m_doApplySettings;

Wyświetl plik

@ -11,7 +11,7 @@
const PluginDescriptor AMDemodPlugin::m_pluginDescriptor = {
AMDemod::m_channelId,
QStringLiteral("AM Demodulator"),
QStringLiteral("6.6.1"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -20,10 +20,12 @@
#include "dsp/dspengine.h"
#include "util/simpleserializer.h"
#include "settings/serializable.h"
#include "settings/rollupstate.h"
#include "amdemodsettings.h"
AMDemodSettings::AMDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -73,7 +75,10 @@ QByteArray AMDemodSettings::serialize() const
s.writeU32(16, m_reverseAPIPort);
s.writeU32(17, m_reverseAPIDeviceIndex);
s.writeU32(18, m_reverseAPIChannelIndex);
s.writeBlob(19, m_rollupState);
if (m_rollupState) {
s.writeBlob(19, m_rollupState->serialize());
}
return s.final();
}
@ -103,9 +108,10 @@ bool AMDemodSettings::deserialize(const QByteArray& data)
m_volume = tmp * 0.1;
d.readS32(5, &tmp, -40);
m_squelch = tmp;
d.readBlob(6, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(6, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -130,7 +136,12 @@ bool AMDemodSettings::deserialize(const QByteArray& data)
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
d.readU32(18, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBlob(19, &m_rollupState);
if (m_rollupState)
{
d.readBlob(19, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -49,11 +49,12 @@ struct AMDemodSettings
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
QByteArray m_rollupState;
Serializable *m_rollupState;
AMDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};

Wyświetl plik

@ -453,6 +453,9 @@ void APTDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAptDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getAptDemodSettings()->getRollupState());
}
}
void APTDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const APTDemodSettings& settings)
@ -506,6 +509,20 @@ void APTDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getAptDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getAptDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getAptDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getAptDemodSettings()->setRollupState(swgRollupState);
}
}
}
void APTDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const APTDemodSettings& settings, bool force)
@ -607,6 +624,13 @@ void APTDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAPTDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgAPTDemodSettings->setRollupState(swgRollupState);
}
}
int APTDemod::webapiActionsPost(

Wyświetl plik

@ -391,7 +391,7 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -477,6 +477,7 @@ APTDemodGUI::APTDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -544,15 +545,18 @@ void APTDemodGUI::displaySettings()
ui->histogram->setChecked(m_settings.m_histogramEqualise);
ui->precipitation->setChecked(m_settings.m_precipitationOverlay);
ui->flip->setChecked(m_settings.m_flip);
if (m_settings.m_flip)
if (m_settings.m_flip) {
ui->image->setAlignment(Qt::AlignBottom | Qt::AlignHCenter);
else
} else {
ui->image->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
}
ui->channels->setCurrentIndex((int)m_settings.m_channels);
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -35,6 +35,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "aptdemodsettings.h"
class PluginAPI;
@ -72,6 +73,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
APTDemodSettings m_settings;
bool m_doApplySettings;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor APTDemodPlugin::m_pluginDescriptor = {
APTDemod::m_channelId,
QStringLiteral("APT Demodulator"),
QStringLiteral("6.17.3"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE and Aptdec authors"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -24,7 +24,8 @@
#include "aptdemodsettings.h"
APTDemodSettings::APTDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -90,7 +91,10 @@ QByteArray APTDemodSettings::serialize() const
s.writeU32(25, m_reverseAPIPort);
s.writeU32(26, m_reverseAPIDeviceIndex);
s.writeU32(27, m_reverseAPIChannelIndex);
s.writeBlob(28, m_rollupState);
if (m_rollupState) {
s.writeBlob(28, m_rollupState->serialize());
}
return s.final();
}
@ -129,9 +133,9 @@ bool APTDemodSettings::deserialize(const QByteArray& data)
d.readString(16, &m_autoSavePath, "");
d.readS32(17, &m_autoSaveMinScanLines, 200);
d.readBlob(20, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(20, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -151,7 +155,12 @@ bool APTDemodSettings::deserialize(const QByteArray& data)
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
d.readU32(27, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBlob(28, &m_rollupState);
if (m_rollupState)
{
d.readBlob(28, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -53,11 +53,12 @@ struct APTDemodSettings
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
QByteArray m_rollupState;
Serializable *m_rollupState;
APTDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};

Wyświetl plik

@ -119,7 +119,7 @@ void ATVDemodGUI::displaySettings()
ui->amScaleOffsetText->setText(QString("%1").arg(m_settings.m_amOffsetFactor));
applySampleRate();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
m_doApplySettings = true;
}
@ -208,7 +208,7 @@ void ATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -247,6 +247,9 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
setTitleColor(m_channelMarker.getColor());
m_deviceUISet->addChannelMarker(&m_channelMarker);

Wyświetl plik

@ -23,6 +23,7 @@
#include "dsp/channelmarker.h"
#include "util/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "atvdemodsettings.h"
@ -59,6 +60,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
ATVDemod* m_atvDemod;
ATVDemodSettings m_settings;

Wyświetl plik

@ -30,7 +30,7 @@ const PluginDescriptor ATVDemodPlugin::m_ptrPluginDescriptor =
{
ATVDemod::m_channelId,
QString("ATV Demodulator"),
QString("6.17.3"),
QString("6.18.0"),
QString("(c) F4HKW for F4EXB / SDRAngel"),
QString("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -23,7 +23,8 @@
#include "atvdemodsettings.h"
ATVDemodSettings::ATVDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -85,7 +86,10 @@ QByteArray ATVDemodSettings::serialize() const
s.writeS32(22, m_amScalingFactor);
s.writeS32(23, m_amOffsetFactor);
s.writeBool(24, m_fftFiltering);
s.writeBlob(25, m_rollupState);
if (m_rollupState) {
s.writeBlob(25, m_rollupState->serialize());
}
return s.final();
}
@ -129,12 +133,24 @@ bool ATVDemodSettings::deserialize(const QByteArray& arrData)
d.readS32(17, &tmp, 250);
m_fmDeviation = tmp / 500.0f;
d.readS32(18, &tmp, 1);
if (m_channelMarker)
{
d.readBlob(19, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
m_atvStd = static_cast<ATVStd>(tmp);
d.readS32(21, &m_streamIndex, 0);
d.readS32(22, &m_amScalingFactor, 100);
d.readS32(23, &m_amOffsetFactor, 0);
d.readBool(24, &m_fftFiltering, false);
d.readBlob(25, &m_rollupState);
if (m_rollupState)
{
d.readBlob(25, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}
@ -322,4 +338,4 @@ void ATVDemodSettings::getBaseValues(int sampleRate, int linesPerSecond, uint32_
{
nbPointsPerLine = sampleRate / linesPerSecond;
nbPointsPerLine = nbPointsPerLine == 0 ? 1 : nbPointsPerLine;
}
}

Wyświetl plik

@ -74,11 +74,12 @@ struct ATVDemodSettings
uint16_t m_udpPort;
Serializable *m_channelMarker;
int m_streamIndex;
QByteArray m_rollupState;
Serializable *m_rollupState;
ATVDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

Wyświetl plik

@ -364,6 +364,9 @@ void BFMDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBfmDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getBfmDemodSettings()->getRollupState());
}
}
int BFMDemod::webapiReportGet(
@ -442,6 +445,20 @@ void BFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getBfmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getBfmDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getBfmDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getBfmDemodSettings()->setRollupState(swgRollupState);
}
}
}
void BFMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -612,6 +629,13 @@ void BFMDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgBFMDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgBFMDemodSettings->setRollupState(swgRollupState);
}
}
void BFMDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -296,7 +296,7 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -394,6 +394,7 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setSpectrumGUI(ui->spectrumGUI);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -467,7 +468,7 @@ void BFMDemodGUI::displaySettings()
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -22,6 +22,7 @@
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "bfmdemodsettings.h"
class PluginAPI;
@ -57,6 +58,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
BFMDemodSettings m_settings;
bool m_doApplySettings;
int m_rdsTimerCount;

Wyświetl plik

@ -29,8 +29,9 @@ const int BFMDemodSettings::m_rfBW[] = {
};
BFMDemodSettings::BFMDemodSettings() :
m_channelMarker(0),
m_spectrumGUI(0)
m_channelMarker(nullptr),
m_spectrumGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -86,7 +87,10 @@ QByteArray BFMDemodSettings::serialize() const
s.writeU32(17, m_reverseAPIDeviceIndex);
s.writeU32(18, m_reverseAPIChannelIndex);
s.writeS32(19, m_streamIndex);
s.writeBlob(20, m_rollupState);
if (m_rollupState) {
s.writeBlob(20, m_rollupState->serialize());
}
return s.final();
}
@ -120,18 +124,19 @@ bool BFMDemodSettings::deserialize(const QByteArray& data)
m_squelch = tmp;
d.readU32(7, &m_rgbColor);
d.readBlob(8, &bytetmp);
if (m_spectrumGUI) {
if (m_spectrumGUI)
{
d.readBlob(8, &bytetmp);
m_spectrumGUI->deserialize(bytetmp);
}
d.readBool(9, &m_audioStereo, false);
d.readBool(10, &m_lsbStereo, false);
d.readBlob(11, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(11, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -152,7 +157,12 @@ bool BFMDemodSettings::deserialize(const QByteArray& data)
d.readU32(18, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readS32(19, &m_streamIndex, 0);
d.readBlob(20, &m_rollupState);
if (m_rollupState)
{
d.readBlob(20, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -45,7 +45,7 @@ struct BFMDemodSettings
Serializable *m_channelMarker;
Serializable *m_spectrumGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
static const int m_nbRFBW;
static const int m_rfBW[];
@ -53,6 +53,7 @@ struct BFMDemodSettings
BFMDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

Wyświetl plik

@ -31,7 +31,7 @@
const PluginDescriptor BFMPlugin::m_pluginDescriptor = {
BFMDemod::m_channelId,
QStringLiteral("Broadcast FM Demodulator"),
QStringLiteral("6.6.1"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -609,6 +609,9 @@ void ChirpChatDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getRollupState());
}
}
int ChirpChatDemod::webapiReportGet(
@ -694,6 +697,20 @@ void ChirpChatDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
response.getChirpChatDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getChirpChatDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getChirpChatDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getChirpChatDemodSettings()->setRollupState(swgRollupState);
}
}
}
void ChirpChatDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -860,6 +877,13 @@ void ChirpChatDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgChirpChatDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgChirpChatDemodSettings->setRollupState(swgRollupState);
}
}
void ChirpChatDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -323,7 +323,7 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -418,6 +418,7 @@ ChirpChatDemodGUI::ChirpChatDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setSpectrumGUI(ui->spectrumGUI);
m_settings.setRollupState(&m_rollupState);
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
@ -498,7 +499,7 @@ void ChirpChatDemodGUI::displaySettings()
displaySquelch();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -21,6 +21,7 @@
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "chirpchatdemodsettings.h"
@ -86,6 +87,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
ChirpChatDemodSettings m_settings;
int m_basebandSampleRate;
bool m_doApplySettings;

Wyświetl plik

@ -127,7 +127,10 @@ QByteArray ChirpChatDemodSettings::serialize() const
s.writeBool(26, m_sendViaUDP);
s.writeString(27, m_udpAddress);
s.writeU32(28, m_udpPort);
s.writeBlob(29, m_rollupState);
if (m_rollupState) {
s.writeBlob(29, m_rollupState->serialize());
}
return s.final();
}
@ -152,12 +155,14 @@ bool ChirpChatDemodSettings::deserialize(const QByteArray& data)
d.readS32(2, &m_bandwidthIndex, 0);
d.readS32(3, &m_spreadFactor, 0);
if (m_spectrumGUI) {
if (m_spectrumGUI)
{
d.readBlob(4, &bytetmp);
m_spectrumGUI->deserialize(bytetmp);
}
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(5, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -200,7 +205,12 @@ bool ChirpChatDemodSettings::deserialize(const QByteArray& data)
} else {
m_udpPort = 9999;
}
d.readBlob(29, &m_rollupState);
if (m_rollupState)
{
d.readBlob(29, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -66,7 +66,7 @@ struct ChirpChatDemodSettings
Serializable *m_channelMarker;
Serializable *m_spectrumGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
static const int bandwidths[];
static const int nbBandwidths;
@ -75,6 +75,7 @@ struct ChirpChatDemodSettings
ChirpChatDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
unsigned int getNbSFDFourths() const; //!< Get the number of SFD period fourths (depends on coding scheme)
bool hasSyncWord() const; //!< Only LoRa has a syncword (for the moment)

Wyświetl plik

@ -27,7 +27,7 @@
const PluginDescriptor ChirpChatPlugin::m_pluginDescriptor = {
ChirpChatDemod::m_channelId,
QStringLiteral("ChirpChat Demodulator"),
QStringLiteral("6.17.4"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -472,6 +472,9 @@ void DABDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDabDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getDabDemodSettings()->getRollupState());
}
}
void DABDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DABDemodSettings& settings)
@ -516,6 +519,20 @@ void DABDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getDabDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getDabDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getDabDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getDabDemodSettings()->setRollupState(swgRollupState);
}
}
}
void DABDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DABDemodSettings& settings, bool force)
@ -593,6 +610,13 @@ void DABDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDABDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgDABDemodSettings->setRollupState(swgRollupState);
}
}
void DABDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -384,7 +384,7 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -475,6 +475,7 @@ DABDemodGUI::DABDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -568,7 +569,7 @@ void DABDemodGUI::displaySettings()
filter();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -27,6 +27,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "dabdemodsettings.h"
#include "dabdemod.h"
@ -62,6 +63,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
DABDemodSettings m_settings;
bool m_doApplySettings;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor DABDemodPlugin::m_pluginDescriptor = {
DABDemod::m_channelId,
QStringLiteral("DAB Demodulator"),
QStringLiteral("6.17.5"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE. DAB library by Jvan Katwijk"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -24,7 +24,8 @@
#include "dabdemodsettings.h"
DABDemodSettings::DABDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -76,12 +77,18 @@ QByteArray DABDemodSettings::serialize() const
s.writeU32(13, m_reverseAPIPort);
s.writeU32(14, m_reverseAPIDeviceIndex);
s.writeU32(15, m_reverseAPIChannelIndex);
s.writeBlob(16, m_rollupState);
for (int i = 0; i < DABDEMOD_COLUMNS; i++)
if (m_rollupState) {
s.writeBlob(16, m_rollupState->serialize());
}
for (int i = 0; i < DABDEMOD_COLUMNS; i++) {
s.writeS32(100 + i, m_columnIndexes[i]);
for (int i = 0; i < DABDEMOD_COLUMNS; i++)
}
for (int i = 0; i < DABDEMOD_COLUMNS; i++) {
s.writeS32(200 + i, m_columnSizes[i]);
}
return s.final();
}
@ -110,9 +117,9 @@ bool DABDemodSettings::deserialize(const QByteArray& data)
d.readBool(6, &m_audioMute, false);
d.readString(7, &m_audioDeviceName, AudioDeviceManager::m_defaultDeviceName);
d.readBlob(8, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(8, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -132,12 +139,20 @@ bool DABDemodSettings::deserialize(const QByteArray& data)
m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
d.readU32(15, &utmp, 0);
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBlob(16, &m_rollupState);
for (int i = 0; i < DABDEMOD_COLUMNS; i++)
if (m_rollupState)
{
d.readBlob(16, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
for (int i = 0; i < DABDEMOD_COLUMNS; i++) {
d.readS32(100 + i, &m_columnIndexes[i], i);
for (int i = 0; i < DABDEMOD_COLUMNS; i++)
}
for (int i = 0; i < DABDEMOD_COLUMNS; i++) {
d.readS32(200 + i, &m_columnSizes[i], -1);
}
return true;
}

Wyświetl plik

@ -45,7 +45,7 @@ struct DABDemodSettings
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
QByteArray m_rollupState;
Serializable *m_rollupState;
int m_columnIndexes[DABDEMOD_COLUMNS];//!< How the columns are ordered in the table
int m_columnSizes[DABDEMOD_COLUMNS]; //!< Size of the columns in the table
@ -53,6 +53,7 @@ struct DABDemodSettings
DABDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};

Wyświetl plik

@ -414,6 +414,9 @@ void DATVDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDatvDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getDatvDemodSettings()->getRollupState());
}
}
void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DATVDemodSettings& settings)
@ -496,6 +499,20 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getDatvDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getDatvDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getDatvDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getDatvDemodSettings()->setRollupState(swgRollupState);
}
}
}
void DATVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -646,6 +663,13 @@ void DATVDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDATVDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgDATVDemodSettings->setRollupState(swgRollupState);
}
}
void DATVDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DATVDemodSettings& settings, bool force)

Wyświetl plik

@ -137,7 +137,7 @@ void DATVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -228,6 +228,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
}
m_settings.setChannelMarker(&m_objChannelMarker);
m_settings.setRollupState(&m_rollupState);
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
@ -394,7 +395,7 @@ void DATVDemodGUI::displaySettings()
connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
}
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -23,6 +23,7 @@
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "settings/rollupstate.h"
#include "datvdemod.h"
@ -101,6 +102,7 @@ private:
DeviceUISet* m_deviceUISet;
ChannelMarker m_objChannelMarker;
RollupState m_rollupState;
DATVDemod* m_datvDemod;
MessageQueue m_inputMessageQueue;
DATVDemodSettings m_settings;

Wyświetl plik

@ -30,7 +30,7 @@ const PluginDescriptor DATVDemodPlugin::m_ptrPluginDescriptor =
{
DATVDemod::m_channelId,
QString("DATV Demodulator"),
QString("6.17.3"),
QString("6.18.0"),
QString("(c) F4HKW for SDRAngel using LeanSDR framework (c) F4DAV"),
QString("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -28,7 +28,8 @@
#include "datvdemodsettings.h"
DATVDemodSettings::DATVDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -113,7 +114,10 @@ QByteArray DATVDemodSettings::serialize() const
s.writeString(34, m_softLDPCToolPath);
s.writeS32(35, m_softLDPCMaxTrials);
s.writeBool(36, m_playerEnable);
s.writeBlob(37, m_rollupState);
if (m_rollupState) {
s.writeBlob(37, m_rollupState->serialize());
}
return s.final();
}
@ -146,9 +150,9 @@ bool DATVDemodSettings::deserialize(const QByteArray& data)
tmp = tmp < 0 ? 0 : tmp >= (int) MOD_UNSET ? (int) MOD_UNSET - 1 : tmp;
m_modulation = (DATVModulation) tmp;
d.readBlob(6, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(6, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -202,7 +206,12 @@ bool DATVDemodSettings::deserialize(const QByteArray& data)
d.readS32(35, &tmp, 8);
m_softLDPCMaxTrials = tmp < 1 ? 1 : tmp > m_softLDPCMaxMaxTrials ? m_softLDPCMaxMaxTrials : tmp;
d.readBool(36, &m_playerEnable, true);
d.readBlob(37, &m_rollupState);
if (m_rollupState)
{
d.readBlob(37, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
validateSystemConfiguration();

Wyświetl plik

@ -107,12 +107,13 @@ struct DATVDemodSettings
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
QByteArray m_rollupState;
Serializable *m_rollupState;
static const int m_softLDPCMaxMaxTrials = 50;
DATVDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
void debug(const QString& msg) const;

Wyświetl plik

@ -453,6 +453,9 @@ void DSDDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDsdDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getDsdDemodSettings()->getRollupState());
}
}
int DSDDemod::webapiReportGet(
@ -527,6 +530,20 @@ void DSDDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getDsdDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getDsdDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getDsdDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getDsdDemodSettings()->setRollupState(swgRollupState);
}
}
}
void DSDDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -689,6 +706,13 @@ void DSDDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDSDDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgDSDDemodSettings->setRollupState(swgRollupState);
}
}
void DSDDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -248,7 +248,7 @@ void DSDDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -378,6 +378,7 @@ DSDDemodGUI::DSDDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
connect(&m_channelMarker, SIGNAL(highlightedByCursor()), this, SLOT(channelMarkerHighlightedByCursor()));
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
updateMyPosition();
displaySettings();
@ -462,7 +463,7 @@ void DSDDemodGUI::displaySettings()
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -26,6 +26,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "dsddemodsettings.h"
#include "dsdstatustextdialog.h"
@ -70,6 +71,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
DSDDemodSettings m_settings;
bool m_doApplySettings;

Wyświetl plik

@ -30,7 +30,7 @@
const PluginDescriptor DSDDemodPlugin::m_pluginDescriptor = {
DSDDemod::m_channelId,
QStringLiteral("DSD Demodulator"),
QStringLiteral("6.10.1"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -23,7 +23,8 @@
#include "dsddemodsettings.h"
DSDDemodSettings::DSDDemodSettings() :
m_channelMarker(nullptr)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -96,7 +97,10 @@ QByteArray DSDDemodSettings::serialize() const
s.writeU32(28, m_reverseAPIChannelIndex);
s.writeBool(29, m_audioMute);
s.writeS32(30, m_streamIndex);
s.writeBlob(31, m_rollupState);
if (m_rollupState) {
s.writeBlob(31, m_rollupState->serialize());
}
return s.final();
}
@ -118,7 +122,8 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
qint32 tmp;
uint32_t utmp;
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(17, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -169,7 +174,12 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
m_reverseAPIChannelIndex = utmp > 99 ? 99 : utmp;
d.readBool(29, &m_audioMute, false);
d.readS32(30, &m_streamIndex, 0);
d.readBlob(31, &m_rollupState);
if (m_rollupState)
{
d.readBlob(31, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -54,11 +54,12 @@ struct DSDDemodSettings
uint16_t m_reverseAPIChannelIndex;
Serializable *m_channelMarker;
QByteArray m_rollupState;
Serializable *m_rollupState;
DSDDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
};

Wyświetl plik

@ -360,6 +360,9 @@ void FreeDVDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFreeDvDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getFreeDvDemodSettings()->getRollupState());
}
}
int FreeDVDemod::webapiReportGet(
@ -437,6 +440,20 @@ void FreeDVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getFreeDvDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getFreeDvDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getFreeDvDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getFreeDvDemodSettings()->setRollupState(swgRollupState);
}
}
}
void FreeDVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -561,6 +578,13 @@ void FreeDVDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFreeDVDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgFreeDVDemodSettings->setRollupState(swgRollupState);
}
}
void FreeDVDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -236,7 +236,7 @@ void FreeDVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -290,6 +290,7 @@ FreeDVDemodGUI::FreeDVDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setSpectrumGUI(ui->spectrumGUI);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -392,7 +393,7 @@ void FreeDVDemodGUI::displaySettings()
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -24,6 +24,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "freedvdemodsettings.h"
class PluginAPI;
@ -59,6 +60,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
FreeDVDemodSettings m_settings;
bool m_doApplySettings;
int m_spectrumRate;

Wyświetl plik

@ -31,8 +31,9 @@ const float FreeDVDemodSettings::m_mminPowerThresholdDBf = 100.0f;
#endif
FreeDVDemodSettings::FreeDVDemodSettings() :
m_channelMarker(0),
m_spectrumGUI(0)
m_channelMarker(nullptr),
m_spectrumGUI(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -80,7 +81,10 @@ QByteArray FreeDVDemodSettings::serialize() const
s.writeU32(22, m_reverseAPIChannelIndex);
s.writeS32(23, (int) m_freeDVMode);
s.writeS32(24, m_streamIndex);
s.writeBlob(25, m_rollupState);
if (m_rollupState) {
s.writeBlob(25, m_rollupState->serialize());
}
return s.final();
}
@ -107,7 +111,8 @@ bool FreeDVDemodSettings::deserialize(const QByteArray& data)
d.readS32(3, &tmp, 30);
m_volume = tmp / 10.0;
if (m_spectrumGUI) {
if (m_spectrumGUI)
{
d.readBlob(4, &bytetmp);
m_spectrumGUI->deserialize(bytetmp);
}
@ -142,7 +147,12 @@ bool FreeDVDemodSettings::deserialize(const QByteArray& data)
}
d.readS32(24, &m_streamIndex, 0);
d.readBlob(25, &m_rollupState);
if (m_rollupState)
{
d.readBlob(25, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -54,11 +54,12 @@ struct FreeDVDemodSettings
Serializable *m_channelMarker;
Serializable *m_spectrumGUI;
QByteArray m_rollupState;
Serializable *m_rollupState;
FreeDVDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

Wyświetl plik

@ -28,7 +28,7 @@
const PluginDescriptor FreeDVPlugin::m_pluginDescriptor = {
FreeDVDemod::m_channelId,
QStringLiteral("FreeDV Demodulator"),
QStringLiteral("6.3.3"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -416,6 +416,9 @@ void NFMDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getNfmDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getNfmDemodSettings()->getRollupState());
}
}
int NFMDemod::webapiReportGet(
@ -483,6 +486,20 @@ void NFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getNfmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getNfmDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getNfmDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getNfmDemodSettings()->setRollupState(swgRollupState);
}
}
}
void NFMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -626,6 +643,13 @@ void NFMDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgNFMDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgNFMDemodSettings->setRollupState(swgRollupState);
}
}
void NFMDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -280,7 +280,7 @@ void NFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_nfmDemod->setSpectrum(m_threadedSampleSink->getMessageQueue(), rollDown);
*/
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -406,6 +406,7 @@ NFMDemodGUI::NFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -508,7 +509,7 @@ void NFMDemodGUI::displaySettings()
setDcsCode(m_reportedDcsCode);
displayStreamIndex();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -6,6 +6,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "nfmdemodsettings.h"
@ -39,6 +40,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
NFMDemodSettings m_settings;
bool m_basicSettingsShown;
bool m_doApplySettings;

Wyświetl plik

@ -42,7 +42,8 @@ const int NFMDemodSettings::m_fmDev[] = { // peak deviation (Hz) - full is doubl
const int NFMDemodSettings::m_nbChannelSpacings = 7;
NFMDemodSettings::NFMDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -107,7 +108,10 @@ QByteArray NFMDemodSettings::serialize() const
s.writeBool(23, m_dcsOn);
s.writeU32(24, m_dcsCode);
s.writeBool(25, m_dcsPositive);
s.writeBlob(26, m_rollupState);
if (m_rollupState) {
s.writeBlob(26, m_rollupState->serialize());
}
return s.final();
}
@ -171,7 +175,12 @@ bool NFMDemodSettings::deserialize(const QByteArray& data)
d.readU32(24, &utmp, 0023);
m_dcsCode = utmp < 511 ? utmp : 511;
d.readBool(25, &m_dcsPositive, false);
d.readBlob(26, &m_rollupState);
if (m_rollupState)
{
d.readBlob(26, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
return true;
}

Wyświetl plik

@ -54,13 +54,14 @@ struct NFMDemodSettings
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
uint16_t m_reverseAPIChannelIndex;
QByteArray m_rollupState;
Serializable *m_channelMarker;
Serializable *m_rollupState;
NFMDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

Wyświetl plik

@ -12,7 +12,7 @@
const PluginDescriptor NFMPlugin::m_pluginDescriptor = {
NFMDemod::m_channelId,
QStringLiteral("NFM Demodulator"),
QStringLiteral("6.10.0"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -480,6 +480,9 @@ void PacketDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getPacketDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getPacketDemodSettings()->getRollupState());
}
}
void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const PacketDemodSettings& settings)
@ -527,6 +530,20 @@ void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getPacketDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
if (settings.m_rollupState)
{
if (response.getPacketDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getPacketDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getPacketDemodSettings()->setRollupState(swgRollupState);
}
}
}
void PacketDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -623,6 +640,13 @@ void PacketDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgPacketDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgPacketDemodSettings->setRollupState(swgRollupState);
}
}
void PacketDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -362,7 +362,7 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -446,6 +446,7 @@ PacketDemodGUI::PacketDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -545,7 +546,7 @@ void PacketDemodGUI::displaySettings()
filter();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -33,6 +33,7 @@
#include "dsp/channelmarker.h"
#include "dsp/movingaverage.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "packetdemodsettings.h"
class PluginAPI;
@ -67,6 +68,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
PacketDemodSettings m_settings;
bool m_doApplySettings;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor PacketDemodPlugin::m_pluginDescriptor = {
PacketDemod::m_channelId,
QStringLiteral("Packet Demodulator"),
QStringLiteral("6.17.4"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Wyświetl plik

@ -24,7 +24,8 @@
#include "packetdemodsettings.h"
PacketDemodSettings::PacketDemodSettings() :
m_channelMarker(0)
m_channelMarker(nullptr),
m_rollupState(nullptr)
{
resetToDefaults();
}
@ -89,12 +90,18 @@ QByteArray PacketDemodSettings::serialize() const
s.writeString(25, m_logFilename);
s.writeBool(26, m_logEnabled);
s.writeBlob(27, m_rollupState);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
if (m_rollupState) {
s.writeBlob(27, m_rollupState->serialize());
}
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) {
s.writeS32(100 + i, m_columnIndexes[i]);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
}
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) {
s.writeS32(200 + i, m_columnSizes[i]);
}
return s.final();
}
@ -120,9 +127,10 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
d.readString(3, &m_filterFrom, "");
d.readString(4, &m_filterTo, "");
d.readString(5, &m_filterPID, "");
d.readBlob(6, &bytetmp);
if (m_channelMarker) {
if (m_channelMarker)
{
d.readBlob(6, &bytetmp);
m_channelMarker->deserialize(bytetmp);
}
@ -149,6 +157,7 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
d.readBool(22, &m_udpEnabled);
d.readString(23, &m_udpAddress);
d.readU32(24, &utmp);
if ((utmp > 1023) && (utmp < 65535)) {
m_udpPort = utmp;
} else {
@ -157,12 +166,20 @@ bool PacketDemodSettings::deserialize(const QByteArray& data)
d.readString(25, &m_logFilename, "pager_log.csv");
d.readBool(26, &m_logEnabled, false);
d.readBlob(27, &m_rollupState);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
if (m_rollupState)
{
d.readBlob(27, &bytetmp);
m_rollupState->deserialize(bytetmp);
}
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) {
d.readS32(100 + i, &m_columnIndexes[i], i);
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++)
}
for (int i = 0; i < PACKETDEMOD_COLUMNS; i++) {
d.readS32(200 + i, &m_columnSizes[i], -1);
}
return true;
}

Wyświetl plik

@ -56,7 +56,7 @@ struct PacketDemodSettings
QString m_logFilename;
bool m_logEnabled;
QByteArray m_rollupState;
Serializable *m_rollupState;
int m_columnIndexes[PACKETDEMOD_COLUMNS];//!< How the columns are ordered in the table
int m_columnSizes[PACKETDEMOD_COLUMNS]; //!< Size of the columns in the table
@ -66,6 +66,7 @@ struct PacketDemodSettings
PacketDemodSettings();
void resetToDefaults();
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
int getBaudRate() const;

Wyświetl plik

@ -465,6 +465,9 @@ void PagerDemod::webapiUpdateChannelSettings(
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getPagerDemodSettings()->getChannelMarker());
}
if (settings.m_rollupState && channelSettingsKeys.contains("rollupState")) {
settings.m_rollupState->updateFrom(channelSettingsKeys, response.getPagerDemodSettings()->getRollupState());
}
}
void PagerDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const PagerDemodSettings& settings)
@ -529,6 +532,19 @@ void PagerDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& re
}
}
if (settings.m_rollupState)
{
if (response.getPagerDemodSettings()->getRollupState())
{
settings.m_rollupState->formatTo(response.getPagerDemodSettings()->getRollupState());
}
else
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
response.getPagerDemodSettings()->setRollupState(swgRollupState);
}
}
}
void PagerDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -638,6 +654,13 @@ void PagerDemod::webapiFormatChannelSettings(
settings.m_channelMarker->formatTo(swgChannelMarker);
swgPagerDemodSettings->setChannelMarker(swgChannelMarker);
}
if (settings.m_rollupState && (channelSettingsKeys.contains("rollupState") || force))
{
SWGSDRangel::SWGRollupState *swgRollupState = new SWGSDRangel::SWGRollupState();
settings.m_rollupState->formatTo(swgRollupState);
swgPagerDemodSettings->setRollupState(swgRollupState);
}
}
void PagerDemod::networkManagerFinished(QNetworkReply *reply)

Wyświetl plik

@ -51,8 +51,7 @@ public:
const PagerDemodSettings& getSettings() const { return m_settings; }
bool getForce() const { return m_force; }
static MsgConfigurePagerDemod* create(const PagerDemodSettings& settings, bool force)
{
static MsgConfigurePagerDemod* create(const PagerDemodSettings& settings, bool force) {
return new MsgConfigurePagerDemod(settings, force);
}
@ -79,9 +78,24 @@ public:
int getBCHParityErrors() const { return m_bchParityErrors; }
QDateTime getDateTime() const { return m_dateTime; }
static MsgPagerMessage* create(int address, int functionBits, const QString& alphaMessage, const QString& numericMessage, int evenParityErrors, int bchParityErrors)
static MsgPagerMessage* create(
int address,
int functionBits,
const QString& alphaMessage,
const QString& numericMessage,
int evenParityErrors,
int bchParityErrors
)
{
return new MsgPagerMessage(address, functionBits, alphaMessage, numericMessage, evenParityErrors, bchParityErrors, QDateTime::currentDateTime());
return new MsgPagerMessage(
address,
functionBits,
alphaMessage,
numericMessage,
evenParityErrors,
bchParityErrors,
QDateTime::currentDateTime()
);
}
private:

Wyświetl plik

@ -413,7 +413,7 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
}
}
m_settings.m_rollupState = saveState();
saveState(m_rollupState);
applySettings();
}
@ -505,6 +505,7 @@ PagerDemodGUI::PagerDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
setTitleColor(m_channelMarker.getColor());
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setScopeGUI(ui->scopeGUI);
m_settings.setRollupState(&m_rollupState);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);
@ -624,6 +625,7 @@ void PagerDemodGUI::displaySettings()
// Order and size columns
QHeaderView *header = ui->messages->horizontalHeader();
for (int i = 0; i < PAGERDEMOD_MESSAGE_COLUMNS; i++)
{
bool hidden = m_settings.m_messageColumnSizes[i] == 0;
@ -633,9 +635,10 @@ void PagerDemodGUI::displaySettings()
ui->messages->setColumnWidth(i, m_settings.m_messageColumnSizes[i]);
header->moveSection(header->visualIndex(i), m_settings.m_messageColumnIndexes[i]);
}
filter();
restoreState(m_settings.m_rollupState);
restoreState(m_rollupState);
blockApplySettings(false);
}

Wyświetl plik

@ -24,6 +24,7 @@
#include "channel/channelgui.h"
#include "dsp/channelmarker.h"
#include "util/messagequeue.h"
#include "settings/rollupstate.h"
#include "pagerdemodsettings.h"
#include "pagerdemod.h"
@ -61,6 +62,7 @@ private:
PluginAPI* m_pluginAPI;
DeviceUISet* m_deviceUISet;
ChannelMarker m_channelMarker;
RollupState m_rollupState;
PagerDemodSettings m_settings;
bool m_doApplySettings;
ScopeVis* m_scopeVis;

Wyświetl plik

@ -29,7 +29,7 @@
const PluginDescriptor PagerDemodPlugin::m_pluginDescriptor = {
PagerDemod::m_channelId,
QStringLiteral("Pager Demodulator"),
QStringLiteral("6.17.4"),
QStringLiteral("6.18.0"),
QStringLiteral("(c) Jon Beniston, M7RCE"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,

Some files were not shown because too many files have changed in this diff Show More