1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-07 16:34:45 -04:00

WFM demod: Web API: settings and report implementation

This commit is contained in:
f4exb
2018-04-09 00:37:17 +02:00
parent b2d153ed9e
commit b4d7a0a905
25 changed files with 1338 additions and 65 deletions
+35
View File
@@ -1896,6 +1896,27 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelSettings.getTx() != 0)
{
QJsonObject wfmModSettingsJsonObject = jsonObject["WFMModSettings"].toObject();
channelSettingsKeys = wfmModSettingsJsonObject.keys();
if (channelSettingsKeys.contains("cwKeyer"))
{
QJsonObject cwKeyerSettingsJsonObject;
appendSettingsSubKeys(wfmModSettingsJsonObject, cwKeyerSettingsJsonObject, "cwKeyer", channelSettingsKeys);
}
channelSettings.setWfmModSettings(new SWGSDRangel::SWGWFMModSettings());
channelSettings.getWfmModSettings()->fromJsonObject(wfmModSettingsJsonObject);
return true;
}
else {
return false;
}
}
else
{
return false;
@@ -1977,6 +1998,20 @@ bool WebAPIRequestMapper::validateChannelReport(
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelReport.getTx() != 0)
{
QJsonObject wfmModReportJsonObject = jsonObject["WFMModReport"].toObject();
channelReportKeys = wfmModReportJsonObject.keys();
channelReport.setWfmModReport(new SWGSDRangel::SWGWFMModReport());
channelReport.getWfmModReport()->fromJsonObject(wfmModReportJsonObject);
return true;
}
else {
return false;
}
}
else
{
return false;