1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

AM demod: Web API: settings and report implementation. NFM demod: fixes

This commit is contained in:
f4exb
2018-04-06 00:54:18 +02:00
parent 376e0d9b1f
commit 0ba86c0d22
27 changed files with 1389 additions and 55 deletions
+35
View File
@@ -1840,6 +1840,27 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "AMMod")
{
if (channelSettings.getTx() != 0)
{
QJsonObject amModSettingsJsonObject = jsonObject["AMModSettings"].toObject();
channelSettingsKeys = amModSettingsJsonObject.keys();
if (channelSettingsKeys.contains("cwKeyer"))
{
QJsonObject cwKeyerSettingsJsonObject;
appendSettingsSubKeys(amModSettingsJsonObject, cwKeyerSettingsJsonObject, "cwKeyer", channelSettingsKeys);
}
channelSettings.setAmModSettings(new SWGSDRangel::SWGAMModSettings());
channelSettings.getAmModSettings()->fromJsonObject(amModSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "NFMDemod")
{
if (channelSettings.getTx() == 0)
@@ -1914,6 +1935,20 @@ bool WebAPIRequestMapper::validateChannelReport(
return false;
}
}
else if (*channelType == "AMMod")
{
if (channelReport.getTx() != 0)
{
QJsonObject amModReportJsonObject = jsonObject["AMModReport"].toObject();
channelReportKeys = amModReportJsonObject.keys();
channelReport.setAmModReport(new SWGSDRangel::SWGAMModReport());
channelReport.getAmModReport()->fromJsonObject(amModReportJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "NFMDemod")
{
if (channelReport.getTx() == 0)