mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
SoapySDR support: REST API: recognize SoapySDR
This commit is contained in:
parent
5bf18ade3f
commit
430f411e8d
@ -1993,6 +1993,36 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((*deviceHwType == "SoapySDR") && (deviceSettings.getTx() == 0))
|
||||
{
|
||||
if (jsonObject.contains("soapySDRInputSettings") && jsonObject["soapySDRInputSettings"].isObject())
|
||||
{
|
||||
QJsonObject soapySdrInputSettingsJsonObject = jsonObject["soapySDRInputSettings"].toObject();
|
||||
deviceSettingsKeys = soapySdrInputSettingsJsonObject.keys();
|
||||
deviceSettings.setSoapySdrInputSettings(new SWGSDRangel::SWGSoapySDRInputSettings());
|
||||
deviceSettings.getSoapySdrInputSettings()->fromJsonObject(soapySdrInputSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if ((*deviceHwType == "SoapySDR") && (deviceSettings.getTx() != 0))
|
||||
{
|
||||
if (jsonObject.contains("soapySDROutputSettings") && jsonObject["soapySDROutputSettings"].isObject())
|
||||
{
|
||||
QJsonObject soapySdrOutputSettingsJsonObject = jsonObject["soapySDROutputSettings"].toObject();
|
||||
deviceSettingsKeys = soapySdrOutputSettingsJsonObject.keys();
|
||||
deviceSettings.setSoapySdrOutputSettings(new SWGSDRangel::SWGSoapySDROutputSettings());
|
||||
deviceSettings.getSoapySdrOutputSettings()->fromJsonObject(soapySdrOutputSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*deviceHwType == "TestSource")
|
||||
{
|
||||
if (jsonObject.contains("testSourceSettings") && jsonObject["testSourceSettings"].isObject())
|
||||
|
Loading…
Reference in New Issue
Block a user