mirror of https://github.com/f4exb/sdrangel.git
SDRPlay: fixed REST API settings PUT and PATCH
This commit is contained in:
parent
83883efcb5
commit
5109253d8b
|
@ -2023,6 +2023,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
||||||
return false;
|
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))
|
else if ((*deviceHwType == "SoapySDR") && (deviceSettings.getTx() == 0))
|
||||||
{
|
{
|
||||||
if (jsonObject.contains("soapySDRInputSettings") && jsonObject["soapySDRInputSettings"].isObject())
|
if (jsonObject.contains("soapySDRInputSettings") && jsonObject["soapySDRInputSettings"].isObject())
|
||||||
|
|
Loading…
Reference in New Issue