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

ATV modulator: Web API: settings and report implementation

This commit is contained in:
f4exb
2018-04-15 00:52:39 +02:00
parent b38d2a2a65
commit b21ea9ab2f
25 changed files with 1496 additions and 16 deletions
+28
View File
@@ -1861,6 +1861,20 @@ bool WebAPIRequestMapper::validateChannelSettings(
return false;
}
}
else if (*channelType == "ATVMod")
{
if (channelSettings.getTx() != 0)
{
QJsonObject atvModSettingsJsonObject = jsonObject["ATVModSettings"].toObject();
channelSettingsKeys = atvModSettingsJsonObject.keys();
channelSettings.setAtvModSettings(new SWGSDRangel::SWGATVModSettings());
channelSettings.getAtvModSettings()->fromJsonObject(atvModSettingsJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "NFMDemod")
{
if (channelSettings.getTx() == 0)
@@ -1991,6 +2005,20 @@ bool WebAPIRequestMapper::validateChannelReport(
return false;
}
}
else if (*channelType == "ATVMod")
{
if (channelReport.getTx() != 0)
{
QJsonObject atvModReportJsonObject = jsonObject["ATVModReport"].toObject();
channelReportKeys = atvModReportJsonObject.keys();
channelReport.setAtvModReport(new SWGSDRangel::SWGATVModReport());
channelReport.getAtvModReport()->fromJsonObject(atvModReportJsonObject);
return true;
}
else {
return false;
}
}
else if (*channelType == "NFMDemod")
{
if (channelReport.getTx() == 0)