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