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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user