1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 22:14:45 -04:00

SSB mod: Web API: settings and report implementation

This commit is contained in:
f4exb
2018-04-14 21:46:53 +02:00
parent 9c7026ae5e
commit b38d2a2a65
7 changed files with 305 additions and 1 deletions
+35
View File
@@ -1896,6 +1896,27 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "SSBMod")
{
if (channelSettings.getTx() != 0)
{
QJsonObject ssbModSettingsJsonObject = jsonObject["SSBModSettings"].toObject();
channelSettingsKeys = ssbModSettingsJsonObject.keys();
if (channelSettingsKeys.contains("cwKeyer"))
{
QJsonObject cwKeyerSettingsJsonObject;
appendSettingsSubKeys(ssbModSettingsJsonObject, cwKeyerSettingsJsonObject, "cwKeyer", channelSettingsKeys);
}
channelSettings.setSsbModSettings(new SWGSDRangel::SWGSSBModSettings());
channelSettings.getSsbModSettings()->fromJsonObject(ssbModSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelSettings.getTx() != 0)
@@ -1998,6 +2019,20 @@ bool WebAPIRequestMapper::validateChannelReport(
return false;
}
}
else if (*channelType == "SSBMod")
{
if (channelReport.getTx() != 0)
{
QJsonObject ssbModReportJsonObject = jsonObject["SSBModReport"].toObject();
channelReportKeys = ssbModReportJsonObject.keys();
channelReport.setSsbModReport(new SWGSDRangel::SWGSSBModReport());
channelReport.getSsbModReport()->fromJsonObject(ssbModReportJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "WFMMod")
{
if (channelReport.getTx() != 0)