mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-15 21:01:45 -05:00
SoapySDR support: REST API: fixed settings structure initialization in request mapper
This commit is contained in:
parent
430f411e8d
commit
df2b0c116a
@ -2000,6 +2000,7 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
|||||||
QJsonObject soapySdrInputSettingsJsonObject = jsonObject["soapySDRInputSettings"].toObject();
|
QJsonObject soapySdrInputSettingsJsonObject = jsonObject["soapySDRInputSettings"].toObject();
|
||||||
deviceSettingsKeys = soapySdrInputSettingsJsonObject.keys();
|
deviceSettingsKeys = soapySdrInputSettingsJsonObject.keys();
|
||||||
deviceSettings.setSoapySdrInputSettings(new SWGSDRangel::SWGSoapySDRInputSettings());
|
deviceSettings.setSoapySdrInputSettings(new SWGSDRangel::SWGSoapySDRInputSettings());
|
||||||
|
deviceSettings.getSoapySdrInputSettings()->init(); // contains complex objects
|
||||||
deviceSettings.getSoapySdrInputSettings()->fromJsonObject(soapySdrInputSettingsJsonObject);
|
deviceSettings.getSoapySdrInputSettings()->fromJsonObject(soapySdrInputSettingsJsonObject);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -2015,6 +2016,7 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
|||||||
QJsonObject soapySdrOutputSettingsJsonObject = jsonObject["soapySDROutputSettings"].toObject();
|
QJsonObject soapySdrOutputSettingsJsonObject = jsonObject["soapySDROutputSettings"].toObject();
|
||||||
deviceSettingsKeys = soapySdrOutputSettingsJsonObject.keys();
|
deviceSettingsKeys = soapySdrOutputSettingsJsonObject.keys();
|
||||||
deviceSettings.setSoapySdrOutputSettings(new SWGSDRangel::SWGSoapySDROutputSettings());
|
deviceSettings.setSoapySdrOutputSettings(new SWGSDRangel::SWGSoapySDROutputSettings());
|
||||||
|
deviceSettings.getSoapySdrInputSettings()->init(); // contains complex objects
|
||||||
deviceSettings.getSoapySdrOutputSettings()->fromJsonObject(soapySdrOutputSettingsJsonObject);
|
deviceSettings.getSoapySdrOutputSettings()->fromJsonObject(soapySdrOutputSettingsJsonObject);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user