SDRPlay: fixed REST API settings PUT and PATCH

pull/278/head
f4exb 2019-01-17 01:01:59 +01:00
rodzic 83883efcb5
commit 5109253d8b
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -2023,6 +2023,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
return false;
}
}
else if (*deviceHwType == "SDRplay1")
{
if (jsonObject.contains("sdrPlaySettings") && jsonObject["sdrPlaySettings"].isObject())
{
QJsonObject sdrPlaySettingsJsonObject = jsonObject["sdrPlaySettings"].toObject();
deviceSettingsKeys = sdrPlaySettingsJsonObject.keys();
deviceSettings.setSdrPlaySettings(new SWGSDRangel::SWGSDRPlaySettings());
deviceSettings.getSdrPlaySettings()->fromJsonObject(sdrPlaySettingsJsonObject);
return true;
}
else
{
return false;
}
}
else if ((*deviceHwType == "SoapySDR") && (deviceSettings.getTx() == 0))
{
if (jsonObject.contains("soapySDRInputSettings") && jsonObject["soapySDRInputSettings"].isObject())