1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 01:39:05 -05:00

DaemonSink: Web API implementation

This commit is contained in:
f4exb 2018-09-06 05:32:11 +02:00
parent 54c89f16aa
commit 3b09e0e5d7
2 changed files with 15 additions and 1 deletions

View File

@ -165,7 +165,7 @@ void DaemonSinkGUI::displaySettings()
m_channelMarker.blockSignals(true);
m_channelMarker.setCenterFrequency(0);
m_channelMarker.setTitle(m_settings.m_title);
m_channelMarker.setBandwidth(5000); // TODO
m_channelMarker.setBandwidth(m_sampleRate); // TODO
m_channelMarker.blockSignals(false);
m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only

View File

@ -2146,6 +2146,20 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "DaemonSink")
{
if (channelSettings.getTx() == 0)
{
QJsonObject daemonChannelSinkSettingsJsonObject = jsonObject["DaemonSinkSettings"].toObject();
channelSettingsKeys = daemonChannelSinkSettingsJsonObject.keys();
channelSettings.setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings());
channelSettings.getDaemonSinkSettings()->fromJsonObject(daemonChannelSinkSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "DaemonSrc")
{
if (channelSettings.getTx() != 0)