mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 10:05:46 -05:00
XTRX output: REST API fixes
This commit is contained in:
parent
919c88b0ce
commit
8d4dc0c8ff
@ -1171,8 +1171,8 @@ int XTRXOutput::webapiSettingsGet(
|
|||||||
QString& errorMessage)
|
QString& errorMessage)
|
||||||
{
|
{
|
||||||
(void) errorMessage;
|
(void) errorMessage;
|
||||||
response.setXtrxInputSettings(new SWGSDRangel::SWGXtrxInputSettings());
|
response.setXtrxOutputSettings(new SWGSDRangel::SWGXtrxOutputSettings());
|
||||||
response.getXtrxInputSettings()->init();
|
response.getXtrxOutputSettings()->init();
|
||||||
webapiFormatDeviceSettings(response, m_settings);
|
webapiFormatDeviceSettings(response, m_settings);
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
@ -1280,7 +1280,7 @@ int XTRXOutput::webapiReportGet(
|
|||||||
{
|
{
|
||||||
(void) errorMessage;
|
(void) errorMessage;
|
||||||
response.setXtrxOutputReport(new SWGSDRangel::SWGXtrxOutputReport());
|
response.setXtrxOutputReport(new SWGSDRangel::SWGXtrxOutputReport());
|
||||||
response.getXtrxInputReport()->init();
|
response.getXtrxOutputReport()->init();
|
||||||
webapiFormatDeviceReport(response);
|
webapiFormatDeviceReport(response);
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
@ -2085,6 +2085,21 @@ bool WebAPIRequestMapper::validateDeviceSettings(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ((*deviceHwType == "XTRX") && (deviceSettings.getTx() != 0))
|
||||||
|
{
|
||||||
|
if (jsonObject.contains("xtrxOutputSettings") && jsonObject["xtrxOutputSettings"].isObject())
|
||||||
|
{
|
||||||
|
QJsonObject xtrxOutputSettingsJsonObject = jsonObject["xtrxOutputSettings"].toObject();
|
||||||
|
deviceSettingsKeys = xtrxOutputSettingsJsonObject.keys();
|
||||||
|
deviceSettings.setXtrxOutputSettings(new SWGSDRangel::SWGXtrxOutputSettings());
|
||||||
|
deviceSettings.getXtrxOutputSettings()->fromJsonObject(xtrxOutputSettingsJsonObject);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user