1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-21 15:51:47 -05:00

Compare commits

...

6 Commits

Author SHA1 Message Date
f4exb
71f63e3a9c API: implemented Channel Marker in MIMO channels 2021-12-03 23:11:56 +01:00
f4exb
2a3ce0e7fb API: implemented Channel Marker in Tx channels 2021-12-03 23:11:56 +01:00
f4exb
8a438a94c1 API: implemented Channel Marker in Rx channels and complete serializable objects for some 2021-12-03 23:11:56 +01:00
Edouard Griffiths
ddaeaf4b43
Merge pull request #1071 from srcejon/map_ibp
Add IBP beacons and GRAVES to Map
2021-12-03 23:10:38 +01:00
Jon Beniston
7b418cb20e Display locator not location 2021-12-03 18:37:10 +00:00
Jon Beniston
629d174c31 Add IBP beacons and GRAVES to Map feature 2021-12-03 18:23:14 +00:00
277 changed files with 3613 additions and 33 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -26,6 +26,7 @@
#include "device/deviceapi.h"
#include "dsp/hbfilterchainconverter.h"
#include "dsp/dspcommands.h"
#include "settings/serializable.h"
#include "feature/feature.h"
#include "maincore.h"
@ -323,6 +324,9 @@ void BeamSteeringCWMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getBeamSteeringCwModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBeamSteeringCwModSettings()->getChannelMarker());
}
}
void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const BeamSteeringCWModSettings& settings)
@ -349,6 +353,20 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
response.getBeamSteeringCwModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getBeamSteeringCwModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getBeamSteeringCwModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getBeamSteeringCwModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getBeamSteeringCwModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getBeamSteeringCwModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void BeamSteeringCWMod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const BeamSteeringCWModSettings& settings, bool force)
@ -429,6 +447,13 @@ void BeamSteeringCWMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("filterChainHash") || force) {
swgBeamSteeringCWSettings->setFilterChainHash(settings.m_filterChainHash);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgBeamSteeringCWSettings->setChannelMarker(swgChannelMarker);
}
}
void BeamSteeringCWMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -76,6 +76,7 @@ bool BeamSteeringCWModGUI::handleMessage(const Message& message)
const BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod& cfg = (BeamSteeringCWMod::MsgConfigureBeamSteeringCWMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -348,6 +348,9 @@ void Interferometer::webapiUpdateChannelSettings(
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getScopeConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getInterferometerSettings()->getChannelMarker());
}
}
void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const InterferometerSettings& settings)
@ -401,6 +404,20 @@ void Interferometer::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
response.getInterferometerSettings()->setScopeConfig(swgGLScope);
}
}
if (settings.m_channelMarker)
{
if (response.getInterferometerSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getInterferometerSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getInterferometerSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void Interferometer::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const InterferometerSettings& settings, bool force)
@ -492,6 +509,13 @@ void Interferometer::webapiFormatChannelSettings(
settings.m_scopeGUI->formatTo(swgInterferometerSettings->getScopeConfig());
}
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgInterferometerSettings->setChannelMarker(swgChannelMarker);
}
}
void Interferometer::networkManagerFinished(QNetworkReply *reply)

View File

@ -87,6 +87,7 @@ bool InterferometerGUI::handleMessage(const Message& message)
m_settings = notif.getSettings();
ui->scopeGUI->updateSettings();
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
return true;
}

View File

@ -298,9 +298,12 @@ void ChannelAnalyzer::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getChannelAnalyzerSettings()->getSpectrumConfig());
}
if (settings.m_spectrumGUI && channelSettingsKeys.contains("scopeConfig")) {
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getChannelAnalyzerSettings()->getScopeConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChannelAnalyzerSettings()->getChannelMarker());
}
}
void ChannelAnalyzer::webapiFormatChannelSettings(
@ -373,6 +376,20 @@ void ChannelAnalyzer::webapiFormatChannelSettings(
response.getChannelAnalyzerSettings()->setScopeConfig(swgGLScope);
}
}
if (settings.m_channelMarker)
{
if (response.getChannelAnalyzerSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getChannelAnalyzerSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getChannelAnalyzerSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void ChannelAnalyzer::webapiReverseSendSettings(
@ -531,6 +548,13 @@ void ChannelAnalyzer::webapiFormatChannelSettings(
settings.m_scopeGUI->formatTo(swgGLScope);
swgChannelAnalyzerSettings->setScopeConfig(swgGLScope);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgChannelAnalyzerSettings->setChannelMarker(swgChannelMarker);
}
}
void ChannelAnalyzer::networkManagerFinished(QNetworkReply *reply)

View File

@ -245,6 +245,7 @@ bool ChannelAnalyzerGUI::handleMessage(const Message& message)
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
ui->scopeGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);

View File

@ -40,6 +40,7 @@
#include "dsp/dspcommands.h"
#include "dsp/devicesamplemimo.h"
#include "device/deviceapi.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -387,6 +388,9 @@ void ADSBDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAdsbDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAdsbDemodSettings()->getChannelMarker());
}
}
int ADSBDemod::webapiReportGet(
@ -437,6 +441,20 @@ void ADSBDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getAdsbDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAdsbDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAdsbDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getAdsbDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAdsbDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAdsbDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void ADSBDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)

View File

@ -1561,6 +1561,7 @@ bool ADSBDemodGUI::handleMessage(const Message& message)
const ADSBDemod::MsgConfigureADSBDemod& cfg = (ADSBDemod::MsgConfigureADSBDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -464,6 +464,12 @@ void AISDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAisDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getAisDemodSettings()->getScopeConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAisDemodSettings()->getChannelMarker());
}
}
void AISDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const AISDemodSettings& settings)
@ -499,6 +505,34 @@ void AISDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getAisDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAisDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAisDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_scopeGUI)
{
if (response.getAisDemodSettings()->getScopeConfig())
{
settings.m_scopeGUI->formatTo(response.getAisDemodSettings()->getScopeConfig());
}
else
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
response.getAisDemodSettings()->setScopeConfig(swgGLScope);
}
}
if (settings.m_channelMarker)
{
if (response.getAisDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAisDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAisDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void AISDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const AISDemodSettings& settings, bool force)
@ -584,6 +618,20 @@ void AISDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgAISDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
swgAISDemodSettings->setScopeConfig(swgGLScope);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAISDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void AISDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -198,6 +198,8 @@ bool AISDemodGUI::handleMessage(const Message& message)
const AISDemod::MsgConfigureAISDemod& cfg = (AISDemod::MsgConfigureAISDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->scopeGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -36,6 +36,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -383,6 +384,9 @@ void AMDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAmDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAmDemodSettings()->getChannelMarker());
}
}
int AMDemod::webapiReportGet(
@ -432,6 +436,20 @@ void AMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
response.getAmDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAmDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAmDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getAmDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAmDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void AMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -545,6 +563,13 @@ void AMDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgAMDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAMDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void AMDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -80,6 +80,7 @@ bool AMDemodGUI::handleMessage(const Message& message)
const AMDemod::MsgConfigureAMDemod& cfg = (AMDemod::MsgConfigureAMDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -39,6 +39,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -436,6 +437,9 @@ void APTDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAptDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAptDemodSettings()->getChannelMarker());
}
}
void APTDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const APTDemodSettings& settings)
@ -475,6 +479,20 @@ void APTDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getAptDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAptDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAptDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getAptDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAptDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAptDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void APTDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const APTDemodSettings& settings, bool force)
@ -569,6 +587,13 @@ void APTDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgAPTDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAPTDemodSettings->setChannelMarker(swgChannelMarker);
}
}
int APTDemod::webapiActionsPost(

View File

@ -94,6 +94,7 @@ bool APTDemodGUI::handleMessage(const Message& message)
const APTDemod::MsgConfigureAPTDemod& cfg = (APTDemod::MsgConfigureAPTDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -348,6 +348,9 @@ void BFMDemod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getBfmDemodSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getBfmDemodSettings()->getChannelMarker());
}
}
int BFMDemod::webapiReportGet(
@ -412,6 +415,20 @@ void BFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getBfmDemodSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getBfmDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getBfmDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getBfmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void BFMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -568,12 +585,20 @@ void BFMDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgBFMDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgBFMDemodSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgBFMDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void BFMDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -105,6 +105,7 @@ bool BFMDemodGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -593,6 +593,9 @@ void ChirpChatDemod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChirpChatDemodSettings()->getChannelMarker());
}
}
int ChirpChatDemod::webapiReportGet(
@ -664,6 +667,20 @@ void ChirpChatDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
response.getChirpChatDemodSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getChirpChatDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getChirpChatDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getChirpChatDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void ChirpChatDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -816,12 +833,20 @@ void ChirpChatDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("title") || force) {
swgChirpChatDemodSettings->setTitle(new QString(settings.m_title));
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgChirpChatDemodSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgChirpChatDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void ChirpChatDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -116,6 +116,7 @@ bool ChirpChatDemodGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);

View File

@ -36,6 +36,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -455,6 +456,9 @@ void DABDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDabDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDabDemodSettings()->getChannelMarker());
}
}
void DABDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DABDemodSettings& settings)
@ -485,6 +489,20 @@ void DABDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getDabDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getDabDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getDabDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getDabDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getDabDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getDabDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void DABDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DABDemodSettings& settings, bool force)
@ -555,6 +573,13 @@ void DABDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgDABDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDABDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void DABDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -193,6 +193,7 @@ bool DABDemodGUI::handleMessage(const Message& message)
const DABDemod::MsgConfigureDABDemod& cfg = (DABDemod::MsgConfigureDABDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -27,6 +27,7 @@
#include "SWGChannelReport.h"
#include "device/deviceapi.h"
#include "settings/serializable.h"
#include "datvdemod.h"
#include "maincore.h"
@ -397,6 +398,9 @@ void DATVDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDatvDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDatvDemodSettings()->getChannelMarker());
}
}
void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DATVDemodSettings& settings)
@ -465,6 +469,20 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getDatvDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getDatvDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getDatvDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getDatvDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getDatvDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getDatvDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void DATVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -608,6 +626,13 @@ void DATVDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgDATVDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDATVDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void DATVDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DATVDemodSettings& settings, bool force)

View File

@ -96,6 +96,7 @@ bool DATVDemodGUI::handleMessage(const Message& message)
{
DATVDemod::MsgConfigureDATVDemod& cfg = (DATVDemod::MsgConfigureDATVDemod&) message;
m_settings = cfg.getSettings();
m_objChannelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
return true;
}
@ -226,6 +227,8 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
}
m_settings.setChannelMarker(&m_objChannelMarker);
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
m_intPreviousDecodedData=0;

View File

@ -38,6 +38,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -436,6 +437,9 @@ void DSDDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDsdDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDsdDemodSettings()->getChannelMarker());
}
}
int DSDDemod::webapiReportGet(
@ -497,6 +501,19 @@ void DSDDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getDsdDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getDsdDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getDsdDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getDsdDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getDsdDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void DSDDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -652,6 +669,13 @@ void DSDDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgDSDDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDSDDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void DSDDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -89,6 +89,7 @@ bool DSDDemodGUI::handleMessage(const Message& message)
const DSDDemod::MsgConfigureDSDDemod& cfg = (DSDDemod::MsgConfigureDSDDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -23,8 +23,7 @@
#include "dsddemodsettings.h"
DSDDemodSettings::DSDDemodSettings() :
m_channelMarker(0),
m_scopeGUI(0)
m_channelMarker(nullptr)
{
resetToDefaults();
}
@ -73,11 +72,6 @@ QByteArray DSDDemodSettings::serialize() const
s.writeU32(7, m_rgbColor);
s.writeS32(8, m_squelchGate);
s.writeS32(9, m_volume*10.0);
if (m_scopeGUI) {
s.writeBlob(10, m_scopeGUI->serialize());
}
s.writeS32(11, m_baudRate);
s.writeBool(12, m_enableCosineFiltering);
s.writeBool(13, m_syncOrConstellation);
@ -144,12 +138,6 @@ bool DSDDemodSettings::deserialize(const QByteArray& data)
d.readS32(8, &m_squelchGate, 5);
d.readS32(9, &tmp, 20);
m_volume = tmp / 10.0;
if (m_scopeGUI) {
d.readBlob(10, &bytetmp);
m_scopeGUI->deserialize(bytetmp);
}
d.readS32(11, &m_baudRate, 4800);
d.readBool(12, &m_enableCosineFiltering, false);
d.readBool(13, &m_syncOrConstellation, false);

View File

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

View File

@ -345,6 +345,9 @@ void FreeDVDemod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getFreeDvDemodSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFreeDvDemodSettings()->getChannelMarker());
}
}
int FreeDVDemod::webapiReportGet(
@ -408,6 +411,20 @@ void FreeDVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getFreeDvDemodSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getFreeDvDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getFreeDvDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getFreeDvDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void FreeDVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -518,12 +535,20 @@ void FreeDVDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgFreeDVDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgFreeDVDemodSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFreeDVDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void FreeDVDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -84,6 +84,7 @@ bool FreeDVDemodGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -36,6 +36,7 @@
#include "dsp/devicesamplemimo.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -399,6 +400,9 @@ void NFMDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getNfmDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getNfmDemodSettings()->getChannelMarker());
}
}
int NFMDemod::webapiReportGet(
@ -452,6 +456,20 @@ void NFMDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getNfmDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getNfmDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getNfmDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getNfmDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getNfmDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getNfmDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void NFMDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -588,6 +606,13 @@ void NFMDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgNFMDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgNFMDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void NFMDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -75,6 +75,7 @@ bool NFMDemodGUI::handleMessage(const Message& message)
const NFMDemod::MsgConfigureNFMDemod& cfg = (NFMDemod::MsgConfigureNFMDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -37,6 +37,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/ax25.h"
#include "util/db.h"
#include "maincore.h"
@ -463,6 +464,9 @@ void PacketDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getPacketDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getPacketDemodSettings()->getChannelMarker());
}
}
void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const PacketDemodSettings& settings)
@ -496,6 +500,20 @@ void PacketDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getPacketDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getPacketDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getPacketDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getPacketDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getPacketDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getPacketDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void PacketDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -585,6 +603,13 @@ void PacketDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgPacketDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgPacketDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void PacketDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -203,6 +203,7 @@ bool PacketDemodGUI::handleMessage(const Message& message)
const PacketDemod::MsgConfigurePacketDemod& cfg = (PacketDemod::MsgConfigurePacketDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -446,6 +446,12 @@ void PagerDemod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getPagerDemodSettings()->getReverseApiChannelIndex();
}
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getPagerDemodSettings()->getScopeConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getPagerDemodSettings()->getChannelMarker());
}
}
void PagerDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const PagerDemodSettings& settings)
@ -481,6 +487,35 @@ void PagerDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& re
response.getPagerDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getPagerDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getPagerDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_scopeGUI)
{
if (response.getPagerDemodSettings()->getScopeConfig())
{
settings.m_scopeGUI->formatTo(response.getPagerDemodSettings()->getScopeConfig());
}
else
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
response.getPagerDemodSettings()->setScopeConfig(swgGLScope);
}
}
if (settings.m_channelMarker)
{
if (response.getPagerDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getPagerDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getPagerDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void PagerDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -576,6 +611,20 @@ void PagerDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgPagerDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
swgPagerDemodSettings->setScopeConfig(swgGLScope);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgPagerDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void PagerDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -256,6 +256,8 @@ bool PagerDemodGUI::handleMessage(const Message& message)
const PagerDemod::MsgConfigurePagerDemod& cfg = (PagerDemod::MsgConfigurePagerDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->scopeGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -420,6 +420,9 @@ void SSBDemod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getSsbDemodSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getSsbDemodSettings()->getChannelMarker());
}
}
int SSBDemod::webapiReportGet(
@ -490,6 +493,20 @@ void SSBDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getSsbDemodSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getSsbDemodSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getSsbDemodSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getSsbDemodSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void SSBDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -621,12 +638,20 @@ void SSBDemod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgSSBDemodSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgSSBDemodSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgSSBDemodSettings->setChannelMarker(swgChannelMarker);
}
}
void SSBDemod::networkManagerFinished(QNetworkReply *reply)

View File

@ -70,6 +70,7 @@ bool SSBDemodGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -497,6 +497,9 @@ void FileSink::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getFileSinkSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFileSinkSettings()->getChannelMarker());
}
}
void FileSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const FileSinkSettings& settings)
@ -549,6 +552,20 @@ void FileSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& resp
response.getFileSinkSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getFileSinkSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getFileSinkSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getFileSinkSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void FileSink::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -659,12 +676,20 @@ void FileSink::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex")) {
swgFileSinkSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgFileSinkSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFileSinkSettings->setChannelMarker(swgChannelMarker);
}
}
void FileSink::networkManagerFinished(QNetworkReply *reply)

View File

@ -97,6 +97,7 @@ bool FileSinkGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->glSpectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;
@ -208,6 +209,7 @@ FileSinkGUI::FileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_channelMarker.blockSignals(false);
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setChannelMarker(&m_channelMarker);
m_settings.setSpectrumGUI(ui->glSpectrumGUI);
m_deviceUISet->addChannelMarker(&m_channelMarker);

View File

@ -43,11 +43,13 @@ struct FileSinkSettings
uint16_t m_reverseAPIChannelIndex;
Serializable *m_spectrumGUI;
Serializable *m_channelMarker;
QByteArray m_rollupState;
FileSinkSettings();
void resetToDefaults();
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

View File

@ -402,6 +402,9 @@ void FreqTracker::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getFreqTrackerSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFreqTrackerSettings()->getChannelMarker());
}
}
int FreqTracker::webapiReportGet(
@ -463,6 +466,20 @@ void FreqTracker::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getFreqTrackerSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getFreqTrackerSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getFreqTrackerSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getFreqTrackerSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void FreqTracker::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -585,12 +602,20 @@ void FreqTracker::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgFreqTrackerSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgFreqTrackerSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFreqTrackerSettings->setChannelMarker(swgChannelMarker);
}
}
void FreqTracker::networkManagerFinished(QNetworkReply *reply)

View File

@ -82,6 +82,7 @@ bool FreqTrackerGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -34,6 +34,7 @@
#include "dsp/devicesamplemimo.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "maincore.h"
#include "localsinkbaseband.h"
@ -411,6 +412,9 @@ void LocalSink::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getLocalSinkSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getLocalSinkSettings()->getChannelMarker());
}
}
void LocalSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const LocalSinkSettings& settings)
@ -439,6 +443,20 @@ void LocalSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getLocalSinkSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getLocalSinkSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getLocalSinkSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getLocalSinkSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getLocalSinkSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getLocalSinkSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void LocalSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const LocalSinkSettings& settings, bool force)
@ -525,6 +543,13 @@ void LocalSink::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgLocalSinkSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgLocalSinkSettings->setChannelMarker(swgChannelMarker);
}
}
void LocalSink::networkManagerFinished(QNetworkReply *reply)

View File

@ -82,6 +82,7 @@ bool LocalSinkGUI::handleMessage(const Message& message)
const LocalSink::MsgConfigureLocalSink& cfg = (LocalSink::MsgConfigureLocalSink&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -643,6 +643,9 @@ void NoiseFigure::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getNoiseFigureSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getNoiseFigureSettings()->getChannelMarker());
}
}
void NoiseFigure::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const NoiseFigureSettings& settings)
@ -668,6 +671,20 @@ void NoiseFigure::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getNoiseFigureSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getNoiseFigureSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getNoiseFigureSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getNoiseFigureSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getNoiseFigureSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getNoiseFigureSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void NoiseFigure::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const NoiseFigureSettings& settings, bool force)
@ -768,6 +785,13 @@ void NoiseFigure::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgNoiseFigureSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgNoiseFigureSettings->setChannelMarker(swgChannelMarker);
}
}
void NoiseFigure::networkManagerFinished(QNetworkReply *reply)

View File

@ -280,6 +280,7 @@ bool NoiseFigureGUI::handleMessage(const Message& message)
const NoiseFigure::MsgConfigureNoiseFigure& cfg = (NoiseFigure::MsgConfigureNoiseFigure&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -908,6 +908,9 @@ void RadioAstronomy::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getRadioAstronomySettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getRadioAstronomySettings()->getChannelMarker());
}
}
void RadioAstronomy::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RadioAstronomySettings& settings)
@ -955,6 +958,20 @@ void RadioAstronomy::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings
response.getRadioAstronomySettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getRadioAstronomySettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getRadioAstronomySettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getRadioAstronomySettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getRadioAstronomySettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getRadioAstronomySettings()->setChannelMarker(swgChannelMarker);
}
}
}
void RadioAstronomy::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RadioAstronomySettings& settings, bool force)
@ -1073,6 +1090,13 @@ void RadioAstronomy::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgRadioAstronomySettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgRadioAstronomySettings->setChannelMarker(swgChannelMarker);
}
}
void RadioAstronomy::networkManagerFinished(QNetworkReply *reply)

View File

@ -1022,6 +1022,7 @@ bool RadioAstronomyGUI::handleMessage(const Message& message)
const RadioAstronomy::MsgConfigureRadioAstronomy& cfg = (RadioAstronomy::MsgConfigureRadioAstronomy&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -333,6 +333,12 @@ void RadioClock::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getRadioClockSettings()->getReverseApiChannelIndex();
}
if (settings.m_scopeGUI && channelSettingsKeys.contains("scopeConfig")) {
settings.m_scopeGUI->updateFrom(channelSettingsKeys, response.getRadioClockSettings()->getScopeConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getRadioClockSettings()->getChannelMarker());
}
}
void RadioClock::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RadioClockSettings& settings)
@ -362,6 +368,34 @@ void RadioClock::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& re
response.getRadioClockSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getRadioClockSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getRadioClockSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_scopeGUI)
{
if (response.getRadioClockSettings()->getScopeConfig())
{
settings.m_scopeGUI->formatTo(response.getRadioClockSettings()->getScopeConfig());
}
else
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
response.getRadioClockSettings()->setScopeConfig(swgGLScope);
}
}
if (settings.m_channelMarker)
{
if (response.getRadioClockSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getRadioClockSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getRadioClockSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void RadioClock::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -452,6 +486,20 @@ void RadioClock::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgRadioClockSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_scopeGUI && (channelSettingsKeys.contains("scopeConfig") || force))
{
SWGSDRangel::SWGGLScope *swgGLScope = new SWGSDRangel::SWGGLScope();
settings.m_scopeGUI->formatTo(swgGLScope);
swgRadioClockSettings->setScopeConfig(swgGLScope);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgRadioClockSettings->setChannelMarker(swgChannelMarker);
}
}
void RadioClock::networkManagerFinished(QNetworkReply *reply)

View File

@ -95,6 +95,8 @@ bool RadioClockGUI::handleMessage(const Message& message)
const RadioClock::MsgConfigureRadioClock& cfg = (RadioClock::MsgConfigureRadioClock&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->scopeGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -37,6 +37,7 @@
#include "dsp/dspdevicesourceengine.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "maincore.h"
#include "remotesinkbaseband.h"
@ -382,6 +383,9 @@ void RemoteSink::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getRemoteSinkSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getRemoteSinkSettings()->getChannelMarker());
}
}
void RemoteSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSinkSettings& settings)
@ -418,6 +422,20 @@ void RemoteSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& re
response.getRemoteSinkSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getRemoteSinkSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getRemoteSinkSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getRemoteSinkSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getRemoteSinkSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getRemoteSinkSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void RemoteSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force)
@ -511,6 +529,13 @@ void RemoteSink::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgRemoteSinkSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgRemoteSinkSettings->setChannelMarker(swgChannelMarker);
}
}
void RemoteSink::networkManagerFinished(QNetworkReply *reply)

View File

@ -70,6 +70,7 @@ bool RemoteSinkGUI::handleMessage(const Message& message)
const RemoteSink::MsgConfigureRemoteSink& cfg = (RemoteSink::MsgConfigureRemoteSink&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);

View File

@ -497,6 +497,9 @@ void SigMFFileSink::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getSigMfFileSinkSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getSigMfFileSinkSettings()->getChannelMarker());
}
}
void SigMFFileSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const SigMFFileSinkSettings& settings)
@ -549,6 +552,20 @@ void SigMFFileSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings&
response.getSigMfFileSinkSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getSigMfFileSinkSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getSigMfFileSinkSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getSigMfFileSinkSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void SigMFFileSink::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -659,12 +676,20 @@ void SigMFFileSink::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex")) {
swgSigMFFileSinkSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgSigMFFileSinkSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgSigMFFileSinkSettings->setChannelMarker(swgChannelMarker);
}
}
void SigMFFileSink::networkManagerFinished(QNetworkReply *reply)

View File

@ -96,6 +96,7 @@ bool SigMFFileSinkGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->glSpectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;
@ -196,6 +197,7 @@ SigMFFileSinkGUI::SigMFFileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISe
m_channelMarker.setVisible(true); // activate signal on the last setting only
m_settings.setSpectrumGUI(ui->glSpectrumGUI);
m_settings.setChannelMarker(&m_channelMarker);
m_deviceUISet->addChannelMarker(&m_channelMarker);
m_deviceUISet->addRollupWidget(this);

View File

@ -44,11 +44,13 @@ struct SigMFFileSinkSettings
uint16_t m_reverseAPIChannelIndex;
Serializable *m_spectrumGUI;
Serializable *m_channelMarker;
QByteArray m_rollupState;
SigMFFileSinkSettings();
void resetToDefaults();
void setSpectrumGUI(Serializable *spectrumGUI) { m_spectrumGUI = spectrumGUI; }
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
QByteArray serialize() const;
bool deserialize(const QByteArray& data);

View File

@ -388,6 +388,9 @@ void UDPSink::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getUdpSinkSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getUdpSinkSettings()->getChannelMarker());
}
}
int UDPSink::webapiReportGet(
@ -460,6 +463,20 @@ void UDPSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
response.getUdpSinkSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getUdpSinkSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getUdpSinkSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getUdpSinkSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void UDPSink::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -593,12 +610,20 @@ void UDPSink::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgUDPSinkSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgUDPSinkSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgUDPSinkSettings->setChannelMarker(swgChannelMarker);
}
}
void UDPSink::networkManagerFinished(QNetworkReply *reply)

View File

@ -76,6 +76,7 @@ bool UDPSinkGUI::handleMessage(const Message& message )
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -34,6 +34,7 @@
#include "dsp/hbfilterchainconverter.h"
#include "dsp/filerecord.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -373,6 +374,9 @@ void FileSource::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getFileSourceSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFileSourceSettings()->getChannelMarker());
}
}
int FileSource::webapiReportGet(
@ -463,6 +467,20 @@ void FileSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& re
response.getFileSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getFileSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getFileSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getFileSourceSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getFileSourceSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getFileSourceSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void FileSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -584,6 +602,13 @@ void FileSource::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgFileSourceSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFileSourceSettings->setChannelMarker(swgChannelMarker);
}
}
void FileSource::networkManagerFinished(QNetworkReply *reply)

View File

@ -82,6 +82,7 @@ bool FileSourceGUI::handleMessage(const Message& message)
const FileSource::MsgConfigureFileSource& cfg = (FileSource::MsgConfigureFileSource&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -32,6 +32,7 @@
#include "dsp/hbfilterchainconverter.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "maincore.h"
#include "localsourcebaseband.h"
@ -414,6 +415,9 @@ void LocalSource::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("streamIndex")) {
settings.m_streamIndex = response.getLocalSourceSettings()->getStreamIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getLocalSourceSettings()->getChannelMarker());
}
}
void LocalSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const LocalSourceSettings& settings)
@ -441,6 +445,20 @@ void LocalSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& r
response.getLocalSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getLocalSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getLocalSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getLocalSourceSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getLocalSourceSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getLocalSourceSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void LocalSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const LocalSourceSettings& settings, bool force)
@ -527,6 +545,13 @@ void LocalSource::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgLocalSourceSettings->setRgbColor(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgLocalSourceSettings->setChannelMarker(swgChannelMarker);
}
}
void LocalSource::networkManagerFinished(QNetworkReply *reply)

View File

@ -76,6 +76,7 @@ bool LocalSourceGUI::handleMessage(const Message& message)
const LocalSource::MsgConfigureLocalSource& cfg = (LocalSource::MsgConfigureLocalSource&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -541,6 +541,9 @@ void IEEE_802_15_4_Mod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("udpPort")) {
settings.m_udpPort = response.getIeee802154ModSettings()->getUdpPort();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getIeee802154ModSettings()->getChannelMarker());
}
}
int IEEE_802_15_4_Mod::webapiReportGet(
@ -655,6 +658,20 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSetti
}
response.getIeee802154ModSettings()->setUdpPort(settings.m_udpPort);
if (settings.m_channelMarker)
{
if (response.getIeee802154ModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getIeee802154ModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getIeee802154ModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void IEEE_802_15_4_Mod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -834,6 +851,13 @@ void IEEE_802_15_4_Mod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("udpPort") || force) {
swgIEEE_802_15_4_ModSettings->setUdpPort(settings.m_udpPort);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgIEEE_802_15_4_ModSettings->setChannelMarker(swgChannelMarker);
}
}
void IEEE_802_15_4_Mod::networkManagerFinished(QNetworkReply *reply)

View File

@ -115,6 +115,7 @@ bool IEEE_802_15_4_ModGUI::handleMessage(const Message& message)
const IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod& cfg = (IEEE_802_15_4_Mod::MsgConfigureIEEE_802_15_4_Mod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -641,6 +641,9 @@ void AISMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("udpPort")) {
settings.m_udpPort = response.getAisModSettings()->getUdpPort();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAisModSettings()->getChannelMarker());
}
}
int AISMod::webapiReportGet(
@ -766,6 +769,20 @@ void AISMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getAisModSettings()->setUdpEnabled(settings.m_udpEnabled);
response.getAisModSettings()->setUdpAddress(new QString(settings.m_udpAddress));
response.getAisModSettings()->setUdpPort(settings.m_udpPort);
if (settings.m_channelMarker)
{
if (response.getAisModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAisModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAisModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void AISMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -930,6 +947,13 @@ void AISMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("udpPort") || force) {
swgAISModSettings->setUdpPort(settings.m_udpPort);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAISModSettings->setChannelMarker(swgChannelMarker);
}
}
void AISMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -84,6 +84,7 @@ bool AISModGUI::handleMessage(const Message& message)
const AISMod::MsgConfigureAISMod& cfg = (AISMod::MsgConfigureAISMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -473,6 +473,9 @@ void AMMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAmModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAmModSettings()->getChannelMarker());
}
}
int AMMod::webapiReportGet(
@ -526,6 +529,20 @@ void AMMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respons
response.getAmModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAmModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAmModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getAmModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAmModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAmModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void AMMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -674,6 +691,13 @@ void AMMod::webapiFormatChannelSettings(
SWGSDRangel::SWGCWKeyerSettings *apiCwKeyerSettings = swgAMModSettings->getCwKeyer();
m_basebandSource->getCWKeyer().webapiFormatChannelSettings(apiCwKeyerSettings, cwKeyerSettings);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgAMModSettings->setChannelMarker(swgChannelMarker);
}
}
void AMMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -93,6 +93,7 @@ bool AMModGUI::handleMessage(const Message& message)
const AMMod::MsgConfigureAMMod& cfg = (AMMod::MsgConfigureAMMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -35,6 +35,7 @@
#include "dsp/devicesamplemimo.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -510,6 +511,9 @@ void ATVMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getAtvModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getAtvModSettings()->getChannelMarker());
}
}
int ATVMod::webapiReportGet(
@ -581,6 +585,20 @@ void ATVMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getAtvModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAtvModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getAtvModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getAtvModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getAtvModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getAtvModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void ATVMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -718,6 +736,13 @@ void ATVMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgATVModSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgATVModSettings->setChannelMarker(swgChannelMarker);
}
}
void ATVMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -208,6 +208,7 @@ bool ATVModGUI::handleMessage(const Message& message)
const ATVMod::MsgConfigureATVMod& cfg = (ATVMod::MsgConfigureATVMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -37,6 +37,7 @@
#include "dsp/dspcommands.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -584,6 +585,9 @@ void ChirpChatMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getChirpChatModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getChirpChatModSettings()->getChannelMarker());
}
}
int ChirpChatMod::webapiReportGet(
@ -725,6 +729,20 @@ void ChirpChatMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings&
response.getChirpChatModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getChirpChatModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getChirpChatModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getChirpChatModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getChirpChatModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getChirpChatModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void ChirpChatMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -913,6 +931,13 @@ void ChirpChatMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("title") || force) {
swgChirpChatModSettings->setTitle(new QString(settings.m_title));
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgChirpChatModSettings->setChannelMarker(swgChannelMarker);
}
}
void ChirpChatMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -81,6 +81,7 @@ bool ChirpChatModGUI::handleMessage(const Message& message)
const ChirpChatMod::MsgConfigureChirpChatMod& cfg = (ChirpChatMod::MsgConfigureChirpChatMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -39,6 +39,7 @@
#include "dsp/devicesamplemimo.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/db.h"
#include "maincore.h"
@ -444,6 +445,9 @@ void DATVMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDatvModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getDatvModSettings()->getChannelMarker());
}
}
int DATVMod::webapiReportGet(
@ -493,6 +497,20 @@ void DATVMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respo
response.getDatvModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getDatvModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getDatvModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getDatvModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getDatvModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getDatvModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void DATVMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -627,6 +645,13 @@ void DATVMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgDATVModSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgDATVModSettings->setChannelMarker(swgChannelMarker);
}
}
void DATVMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -193,6 +193,7 @@ bool DATVModGUI::handleMessage(const Message& message)
const DATVMod::MsgConfigureDATVMod& cfg = (DATVMod::MsgConfigureDATVMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -453,6 +453,9 @@ void FreeDVMod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getFreeDvModSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getFreeDvModSettings()->getChannelMarker());
}
}
int FreeDVMod::webapiReportGet(
@ -521,6 +524,20 @@ void FreeDVMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getFreeDvModSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getFreeDvModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getFreeDvModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getFreeDvModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void FreeDVMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -664,6 +681,7 @@ void FreeDVMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgFreeDVModSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
@ -671,6 +689,13 @@ void FreeDVMod::webapiFormatChannelSettings(
swgFreeDVModSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgFreeDVModSettings->setChannelMarker(swgChannelMarker);
}
if (force)
{
const CWKeyerSettings& cwKeyerSettings = m_basebandSource->getCWKeyer().getSettings();

View File

@ -105,6 +105,7 @@ bool FreeDVModGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -535,6 +535,9 @@ void NFMMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getNfmModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getNfmModSettings()->getChannelMarker());
}
}
int NFMMod::webapiReportGet(
@ -594,6 +597,20 @@ void NFMMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getNfmModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getNfmModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getNfmModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getNfmModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getNfmModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getNfmModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void NFMMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -753,6 +770,13 @@ void NFMMod::webapiFormatChannelSettings(
swgNFMModSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgNFMModSettings->setChannelMarker(swgChannelMarker);
}
if (force)
{
const CWKeyerSettings& cwKeyerSettings = m_basebandSource->getCWKeyer().getSettings();

View File

@ -94,6 +94,7 @@ bool NFMModGUI::handleMessage(const Message& message)
const NFMMod::MsgConfigureNFMMod& cfg = (NFMMod::MsgConfigureNFMMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -636,6 +636,9 @@ void PacketMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("udpPort")) {
settings.m_udpPort = response.getPacketModSettings()->getUdpPort();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getPacketModSettings()->getChannelMarker());
}
}
int PacketMod::webapiReportGet(
@ -796,6 +799,20 @@ void PacketMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getPacketModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getPacketModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getPacketModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getPacketModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getPacketModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getPacketModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void PacketMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -1005,6 +1022,13 @@ void PacketMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("udpPort") || force) {
swgPacketModSettings->setUdpPort(settings.m_udpPort);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgPacketModSettings->setChannelMarker(swgChannelMarker);
}
}
void PacketMod::networkManagerFinished(QNetworkReply *reply)

View File

@ -84,6 +84,7 @@ bool PacketModGUI::handleMessage(const Message& message)
const PacketMod::MsgConfigurePacketMod& cfg = (PacketMod::MsgConfigurePacketMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -524,6 +524,9 @@ void SSBMod::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getSsbModSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getSsbModSettings()->getChannelMarker());
}
}
int SSBMod::webapiReportGet(
@ -599,6 +602,20 @@ void SSBMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getSsbModSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getSsbModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getSsbModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getSsbModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void SSBMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -763,6 +780,7 @@ void SSBMod::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgSSBModSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
@ -770,6 +788,14 @@ void SSBMod::webapiFormatChannelSettings(
swgSSBModSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgSSBModSettings->setChannelMarker(swgChannelMarker);
}
if (force)
{
const CWKeyerSettings& cwKeyerSettings = m_basebandSource->getCWKeyer().getSettings();

View File

@ -111,6 +111,7 @@ bool SSBModGUI::handleMessage(const Message& message)
m_settings = mod_settings;
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -459,6 +459,9 @@ void WFMMod::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getWfmModSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getWfmModSettings()->getChannelMarker());
}
}
int WFMMod::webapiReportGet(
@ -513,6 +516,20 @@ void WFMMod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& respon
response.getWfmModSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getWfmModSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getWfmModSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getWfmModSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getWfmModSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getWfmModSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void WFMMod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -657,6 +674,13 @@ void WFMMod::webapiFormatChannelSettings(
swgWFMModSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgWFMModSettings->setChannelMarker(swgChannelMarker);
}
if (force)
{
const CWKeyerSettings& cwKeyerSettings = m_basebandSource->getCWKeyer().getSettings();

View File

@ -93,6 +93,7 @@ bool WFMModGUI::handleMessage(const Message& message)
const WFMMod::MsgConfigureWFMMod& cfg = (WFMMod::MsgConfigureWFMMod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -30,6 +30,7 @@
#include "dsp/devicesamplesink.h"
#include "device/deviceapi.h"
#include "feature/feature.h"
#include "settings/serializable.h"
#include "util/timeutil.h"
#include "util/db.h"
#include "maincore.h"
@ -291,6 +292,9 @@ void RemoteSource::webapiUpdateChannelSettings(
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getRemoteSourceSettings()->getReverseApiChannelIndex();
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getRemoteSourceSettings()->getChannelMarker());
}
}
int RemoteSource::webapiReportGet(
@ -332,6 +336,20 @@ void RemoteSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings&
response.getRemoteSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getRemoteSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getRemoteSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
if (settings.m_channelMarker)
{
if (response.getRemoteSourceSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getRemoteSourceSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getRemoteSourceSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void RemoteSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -433,6 +451,13 @@ void RemoteSource::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgRemoteSourceSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgRemoteSourceSettings->setChannelMarker(swgChannelMarker);
}
}
void RemoteSource::networkManagerFinished(QNetworkReply *reply)

View File

@ -70,6 +70,7 @@ bool RemoteSourceGUI::handleMessage(const Message& message)
const RemoteSource::MsgConfigureRemoteSource& cfg = (RemoteSource::MsgConfigureRemoteSource&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -421,6 +421,9 @@ void UDPSource::webapiUpdateChannelSettings(
if (settings.m_spectrumGUI && channelSettingsKeys.contains("spectrumConfig")) {
settings.m_spectrumGUI->updateFrom(channelSettingsKeys, response.getUdpSourceSettings()->getSpectrumConfig());
}
if (settings.m_channelMarker && channelSettingsKeys.contains("channelMarker")) {
settings.m_channelMarker->updateFrom(channelSettingsKeys, response.getUdpSourceSettings()->getChannelMarker());
}
}
int UDPSource::webapiReportGet(
@ -500,6 +503,20 @@ void UDPSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
response.getUdpSourceSettings()->setSpectrumConfig(swgGLSpectrum);
}
}
if (settings.m_channelMarker)
{
if (response.getUdpSourceSettings()->getChannelMarker())
{
settings.m_channelMarker->formatTo(response.getUdpSourceSettings()->getChannelMarker());
}
else
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
response.getUdpSourceSettings()->setChannelMarker(swgChannelMarker);
}
}
}
void UDPSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
@ -640,12 +657,20 @@ void UDPSource::webapiFormatChannelSettings(
if (channelSettingsKeys.contains("streamIndex") || force) {
swgUDPSourceSettings->setStreamIndex(settings.m_streamIndex);
}
if (settings.m_spectrumGUI && (channelSettingsKeys.contains("spectrunConfig") || force))
{
SWGSDRangel::SWGGLSpectrum *swgGLSpectrum = new SWGSDRangel::SWGGLSpectrum();
settings.m_spectrumGUI->formatTo(swgGLSpectrum);
swgUDPSourceSettings->setSpectrumConfig(swgGLSpectrum);
}
if (settings.m_channelMarker && (channelSettingsKeys.contains("channelMarker") || force))
{
SWGSDRangel::SWGChannelMarker *swgChannelMarker = new SWGSDRangel::SWGChannelMarker();
settings.m_channelMarker->formatTo(swgChannelMarker);
swgUDPSourceSettings->setChannelMarker(swgChannelMarker);
}
}
void UDPSource::networkManagerFinished(QNetworkReply *reply)

View File

@ -73,6 +73,7 @@ bool UDPSourceGUI::handleMessage(const Message& message)
m_settings = cfg.getSettings();
blockApplySettings(true);
ui->spectrumGUI->updateSettings();
m_channelMarker.updateSettings(static_cast<const ChannelMarker*>(m_settings.m_channelMarker));
displaySettings();
blockApplySettings(false);
return true;

View File

@ -6,6 +6,7 @@ set(map_SOURCES
mapplugin.cpp
mapwebapiadapter.cpp
osmtemplateserver.cpp
ibpbeacon.cpp
)
set(map_HEADERS
@ -16,6 +17,7 @@ set(map_HEADERS
mapwebapiadapter.h
osmtemplateserver.h
beacon.h
ibpbeacon.h
)
include_directories(
@ -35,6 +37,8 @@ if(NOT SERVER_MODE)
mapsettingsdialog.ui
mapbeacondialog.cpp
mapbeacondialog.ui
mapibpbeacondialog.cpp
mapibpbeacondialog.ui
mapradiotimedialog.cpp
mapradiotimedialog.ui
map.qrc
@ -47,6 +51,7 @@ if(NOT SERVER_MODE)
mapmaidenheaddialog.h
mapsettingsdialog.h
mapbeacondialog.h
mapibpbeacon.h
mapradiotimedialog.h
)

View File

@ -0,0 +1,45 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2021 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "ibpbeacon.h"
QList<IBPBeacon> IBPBeacon::m_beacons = {
IBPBeacon("4U1UN", "United Nations NY", "FN30AS", 0),
IBPBeacon("VE8AT", "North Canada", "EQ79AX", 10),
IBPBeacon("W6WX", "USA (CA)", "CM97BD", 20),
IBPBeacon("KH6WO", "Hawaii", "BL10TS", 30),
IBPBeacon("ZL6B", "New Zealand", "RE78TW", 40),
IBPBeacon("VK6RBP", "West Australia", "OF87AV", 50),
IBPBeacon("JA2IGY", "Japan", "PM84JK", 60),
IBPBeacon("RR9O", "Siberia", "NO14KX", 70),
IBPBeacon("VR2HK", "China", "OL72CQ", 80),
IBPBeacon("4S7B", "Sri Lanka", "NJ06CR", 90),
IBPBeacon("ZS6DN", "South Africa", "KG44DC", 100),
IBPBeacon("5Z4B", "Kenya", "KI88MX", 110),
IBPBeacon("4X6TU", "Israel", "KM72JB", 120),
IBPBeacon("OH2B", "Finland", "KP20BM", 130),
IBPBeacon("CS3B", "Madeira", "IM12OR", 140),
IBPBeacon("LU4AA", "Argentina", "GF05TJ", 150),
IBPBeacon("OA4B", "Peru", "FH17MW", 160),
IBPBeacon("YV5B", "Venezuela", "FJ69CC", 170)
};
// The frequencies in MHz through which the IBP beacons rotate
QList<double> IBPBeacon::m_frequencies = {
14.1, 18.11, 21.150, 24.93, 28.2
};

View File

@ -0,0 +1,66 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2021 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_IBP_BEACON_H
#define INCLUDE_IBP_BEACON_H
#include <QString>
#include <QList>
#include "util/maidenhead.h"
// International Beacon Project beacons
// https://www.ncdxf.org/beacon/
struct IBPBeacon {
QString m_callsign;
QString m_location;
QString m_locator;
int m_offset; // Time offset in seconds
float m_latitude;
float m_longitude;
IBPBeacon(const QString& callsign, const QString& location, const QString& locator, int offset) :
m_callsign(callsign),
m_location(location),
m_locator(locator),
m_offset(offset)
{
Maidenhead::fromMaidenhead(locator, m_latitude, m_longitude);
}
QString getText() const
{
QStringList list;
list.append("IBP Beacon");
list.append(QString("Callsign: %1").arg(m_callsign));
list.append(QString("Frequency: 14.1, 18.11, 21.15, 24.92, 28.2MHz"));
list.append(QString("Power: 100 Watts ERP"));
list.append(QString("Polarization: V"));
list.append(QString("Pattern: Omni"));
list.append(QString("Key: A1"));
list.append(QString("Locator: %1").arg(m_locator));
return list.join("\n");
}
static QList<IBPBeacon> m_beacons;
static QList<double> m_frequencies;
static const int m_period = 10; // Beacons rotate every 10 seconds
};
#endif // INCLUDE_IBP_BEACON_H

View File

@ -2,5 +2,6 @@
<qresource prefix="/map/">
<file>icons/groundtracks.png</file>
<file>icons/clock.png</file>
<file>icons/ibp.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -38,6 +38,7 @@
#include "maplocationdialog.h"
#include "mapmaidenheaddialog.h"
#include "mapsettingsdialog.h"
#include "ibpbeacon.h"
#include "ui_mapgui.h"
#include "map.h"
@ -683,6 +684,7 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur
m_mapModel(this),
m_beacons(nullptr),
m_beaconDialog(this),
m_ibpBeaconDialog(this),
m_radioTimeDialog(this)
{
ui->setupUi(this);
@ -748,8 +750,10 @@ MapGUI::MapGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur
QList<Beacon *> *beacons = Beacon::readIARUCSV(MapGUI::getBeaconFilename());
if (beacons != nullptr)
setBeacons(beacons);
addIBPBeacons();
addRadioTimeTransmitters();
addRadar();
}
MapGUI::~MapGUI()
@ -787,6 +791,24 @@ void MapGUI::setBeacons(QList<Beacon *> *beacons)
}
}
void MapGUI::addIBPBeacons()
{
// Add to Map
for (const auto beacon : IBPBeacon::m_beacons)
{
SWGSDRangel::SWGMapItem beaconMapItem;
beaconMapItem.setName(new QString(beacon.m_callsign));
beaconMapItem.setLatitude(beacon.m_latitude);
beaconMapItem.setLongitude(beacon.m_longitude);
beaconMapItem.setAltitude(0);
beaconMapItem.setImage(new QString("antenna.png"));
beaconMapItem.setImageRotation(0);
beaconMapItem.setImageMinZoom(8);
beaconMapItem.setText(new QString(beacon.getText()));
m_mapModel.update(m_map, &beaconMapItem, MapSettings::SOURCE_BEACONS);
}
}
const QList<RadioTimeTransmitter> MapGUI::m_radioTimeTransmitters = {
{"MSF", 60000, 54.9075f, -3.27333f, 17},
{"DCF77", 77500, 50.01611111f, 9.00805556f, 50},
@ -818,6 +840,23 @@ void MapGUI::addRadioTimeTransmitters()
}
}
void MapGUI::addRadar()
{
SWGSDRangel::SWGMapItem radarMapItem;
radarMapItem.setName(new QString("GRAVES"));
radarMapItem.setLatitude(47.3480);
radarMapItem.setLongitude(5.5151);
radarMapItem.setAltitude(0.0);
radarMapItem.setImage(new QString("antenna.png"));
radarMapItem.setImageRotation(0);
radarMapItem.setImageMinZoom(8);
QString text = QString("Radar\nCallsign: %1\nFrequency: %2 MHz")
.arg("GRAVES")
.arg("143.050");
radarMapItem.setText(new QString(text));
m_mapModel.update(m_map, &radarMapItem, MapSettings::SOURCE_RADAR);
}
static QString arrayToString(QJsonArray array)
{
QString s;
@ -1300,6 +1339,11 @@ void MapGUI::on_beacons_clicked()
m_beaconDialog.show();
}
void MapGUI::on_ibpBeacons_clicked()
{
m_ibpBeaconDialog.show();
}
void MapGUI::on_radiotime_clicked()
{
m_radioTimeDialog.updateTable();

View File

@ -31,6 +31,7 @@
#include "mapsettings.h"
#include "SWGMapItem.h"
#include "mapbeacondialog.h"
#include "mapibpbeacondialog.h"
#include "mapradiotimedialog.h"
#include "osmtemplateserver.h"
@ -481,8 +482,10 @@ public:
static QString getBeaconFilename();
QList<Beacon *> *getBeacons() { return m_beacons; }
void setBeacons(QList<Beacon *> *beacons);
void addIBPBeacons();
QList<RadioTimeTransmitter> getRadioTimeTransmitters() { return m_radioTimeTransmitters; }
void addRadioTimeTransmitters();
void addRadar();
void addDAB();
void find(const QString& target);
Q_INVOKABLE void supportedMapsChanged();
@ -501,6 +504,7 @@ private:
AzEl m_azEl; // Position of station
QList<Beacon *> *m_beacons;
MapBeaconDialog m_beaconDialog;
MapIBPBeaconDialog m_ibpBeaconDialog;
MapRadioTimeDialog m_radioTimeDialog;
quint16 m_osmPort;
OSMTemplateServer *m_templateServer;
@ -536,6 +540,7 @@ private slots:
void on_displaySettings_clicked();
void on_mapTypes_currentIndexChanged(int index);
void on_beacons_clicked();
void on_ibpBeacons_clicked();
void on_radiotime_clicked();
};

View File

@ -140,6 +140,20 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="ibpBeacons">
<property name="toolTip">
<string>Display IBP Beacon dialog</string>
</property>
<property name="text">
<string>IBP</string>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/map/icons/ibp.png</normaloff>:/map/icons/ibp.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="radiotime">
<property name="toolTip">

View File

@ -0,0 +1,106 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2021 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#include "mapibpbeacondialog.h"
#include <QDebug>
#include "channel/channelwebapiutils.h"
#include "mapgui.h"
MapIBPBeaconDialog::MapIBPBeaconDialog(MapGUI *gui, QWidget* parent) :
QDialog(parent),
m_gui(gui),
m_timer(this),
ui(new Ui::MapIBPBeaconDialog)
{
ui->setupUi(this);
connect(&m_timer, &QTimer::timeout, this, &MapIBPBeaconDialog::updateTime);
m_timer.setInterval(1000);
m_timer.start();
ui->beacons->setRowCount(IBPBeacon::m_frequencies.size());
for (int row = 0; row < IBPBeacon::m_frequencies.size(); row++)
{
ui->beacons->setItem(row, IBP_BEACON_COL_FREQUENCY, new QTableWidgetItem(QString::number(IBPBeacon::m_frequencies[row], 'f', 3)));
ui->beacons->setItem(row, IBP_BEACON_COL_CALLSIGN, new QTableWidgetItem(""));
ui->beacons->setItem(row, IBP_BEACON_COL_LOCATION, new QTableWidgetItem(""));
ui->beacons->setItem(row, IBP_BEACON_COL_AZIMUTH, new QTableWidgetItem(""));
ui->beacons->setItem(row, IBP_BEACON_COL_DISTANCE, new QTableWidgetItem(""));
}
updateTable(QTime::currentTime());
}
MapIBPBeaconDialog::~MapIBPBeaconDialog()
{
delete ui;
}
void MapIBPBeaconDialog::updateTable(QTime time)
{
AzEl azEl = *m_gui->getAzEl();
// Repeat from begining every 3 minutes
int index = ((time.minute() * 60 + time.second()) % 180) / IBPBeacon::m_period;
for (int row = 0; row < IBPBeacon::m_frequencies.size(); row++)
{
ui->beacons->item(row, IBP_BEACON_COL_CALLSIGN)->setText(IBPBeacon::m_beacons[index].m_callsign);
ui->beacons->item(row, IBP_BEACON_COL_LOCATION)->setText(IBPBeacon::m_beacons[index].m_location);
// Calculate azimuth and distance to beacon
azEl.setTarget(IBPBeacon::m_beacons[index].m_latitude, IBPBeacon::m_beacons[index].m_longitude, 0.0);
azEl.calculate();
ui->beacons->item(row, IBP_BEACON_COL_AZIMUTH)->setData(Qt::DisplayRole, round(azEl.getAzimuth()));
int km = round(azEl.getDistance()/1000);
ui->beacons->item(row, IBP_BEACON_COL_DISTANCE)->setData(Qt::DisplayRole, km);
index--;
if (index < 0) {
index = IBPBeacon::m_beacons.size() - 1;
}
}
}
void MapIBPBeaconDialog::accept()
{
QDialog::accept();
}
void MapIBPBeaconDialog::on_beacons_cellDoubleClicked(int row, int column)
{
if (column == IBP_BEACON_COL_CALLSIGN)
{
// Find beacon on map
QString location = ui->beacons->item(row, column)->text();
m_gui->find(location);
}
else if (column == IBP_BEACON_COL_FREQUENCY)
{
// Tune to beacon freq
ChannelWebAPIUtils::setCenterFrequency(0, ui->beacons->item(row, column)->text().toDouble() * 1e6);
}
}
void MapIBPBeaconDialog::updateTime()
{
QTime t = QTime::currentTime();
ui->time->setTime(t);
// Beacons rotate every 10 seconds
if ((t.second() % IBPBeacon::m_period) == 0) {
updateTable(t);
}
}

View File

@ -0,0 +1,57 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2021 Jon Beniston, M7RCE //
// //
// This program is free software; you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation as version 3 of the License, or //
// (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
// GNU General Public License V3 for more details. //
// //
// You should have received a copy of the GNU General Public License //
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
///////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDE_FEATURE_MAPIBPBEACONDIALOG_H
#define INCLUDE_FEATURE_MAPIBPBEACONDIALOG_H
#include "ui_mapibpbeacondialog.h"
#include <QTimer>
#include <QTime>
#include "ibpbeacon.h"
class MapGUI;
class MapIBPBeaconDialog : public QDialog {
Q_OBJECT
public:
explicit MapIBPBeaconDialog(MapGUI *gui, QWidget* parent = 0);
~MapIBPBeaconDialog();
void updateTable(QTime time);
private slots:
void accept();
void on_beacons_cellDoubleClicked(int row, int column);
void updateTime();
private:
MapGUI *m_gui;
QTimer m_timer;
Ui::MapIBPBeaconDialog* ui;
enum BeaconCol {
IBP_BEACON_COL_FREQUENCY,
IBP_BEACON_COL_CALLSIGN,
IBP_BEACON_COL_LOCATION,
IBP_BEACON_COL_AZIMUTH,
IBP_BEACON_COL_DISTANCE
};
};
#endif // INCLUDE_FEATURE_MAPIBPBEACONDIALOG_H

View File

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MapIBPBeaconDialog</class>
<widget class="QDialog" name="MapIBPBeaconDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>584</width>
<height>311</height>
</rect>
</property>
<property name="font">
<font>
<family>Liberation Sans</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>IBP Beacons</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QGroupBox" name="groupBox">
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="topMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="timeLabel">
<property name="text">
<string>Time</string>
</property>
</widget>
</item>
<item>
<widget class="QTimeEdit" name="time">
<property name="toolTip">
<string>Current time</string>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="buttonSymbols">
<enum>QAbstractSpinBox::NoButtons</enum>
</property>
<property name="currentSection">
<enum>QDateTimeEdit::HourSection</enum>
</property>
<property name="displayFormat">
<string>HH:mm:ss</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QTableWidget" name="beacons">
<property name="toolTip">
<string>Displays which IBP beacon is transmitting on which frequency</string>
</property>
<column>
<property name="text">
<string>Frequency (MHz)</string>
</property>
</column>
<column>
<property name="text">
<string>Callsign</string>
</property>
</column>
<column>
<property name="text">
<string>Location</string>
</property>
</column>
<column>
<property name="text">
<string>Azimuth (°)</string>
</property>
</column>
<column>
<property name="text">
<string>Distance (km)</string>
</property>
</column>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<tabstops>
<tabstop>beacons</tabstop>
<tabstop>time</tabstop>
</tabstops>
<resources>
<include location="../../../sdrgui/resources/res.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>MapIBPBeaconDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>MapIBPBeaconDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@ -68,9 +68,10 @@ struct MapSettings
static const quint32 SOURCE_SATELLITE_TRACKER = 0x10;
static const quint32 SOURCE_BEACONS = 0x20;
static const quint32 SOURCE_RADIO_TIME = 0x40;
static const quint32 SOURCE_AM = 0x80;
static const quint32 SOURCE_FM = 0x100;
static const quint32 SOURCE_DAB = 0x200;
static const quint32 SOURCE_RADAR = 0x80;
static const quint32 SOURCE_AM = 0x100;
static const quint32 SOURCE_FM = 0x200;
static const quint32 SOURCE_DAB = 0x400;
static const quint32 SOURCE_STATION = 0x400; // Antenna at "My Position"
};

View File

@ -97,6 +97,14 @@
<enum>Checked</enum>
</property>
</item>
<item>
<property name="text">
<string>Radar</string>
</property>
<property name="checkState">
<enum>Checked</enum>
</property>
</item>
</widget>
</item>
<item>

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