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