1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-03 06:24:48 -04:00

API: implemented Channel Marker in Tx channels

This commit is contained in:
f4exb
2021-12-03 22:32:54 +01:00
parent 8a438a94c1
commit 2a3ce0e7fb
92 changed files with 1017 additions and 2 deletions
+25
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)