1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-12 19:36:10 -05:00

SDRPlay: fixed REST API settings PUT and PATCH

This commit is contained in:
f4exb 2019-01-17 01:01:59 +01:00
parent 83883efcb5
commit 5109253d8b

View File

@ -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())