diff --git a/plugins/samplesink/xtrxoutput/xtrxoutput.cpp b/plugins/samplesink/xtrxoutput/xtrxoutput.cpp index bdeed42b5..ecff4d2cd 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutput.cpp +++ b/plugins/samplesink/xtrxoutput/xtrxoutput.cpp @@ -1171,8 +1171,8 @@ int XTRXOutput::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setXtrxInputSettings(new SWGSDRangel::SWGXtrxInputSettings()); - response.getXtrxInputSettings()->init(); + response.setXtrxOutputSettings(new SWGSDRangel::SWGXtrxOutputSettings()); + response.getXtrxOutputSettings()->init(); webapiFormatDeviceSettings(response, m_settings); return 200; } @@ -1280,7 +1280,7 @@ int XTRXOutput::webapiReportGet( { (void) errorMessage; response.setXtrxOutputReport(new SWGSDRangel::SWGXtrxOutputReport()); - response.getXtrxInputReport()->init(); + response.getXtrxOutputReport()->init(); webapiFormatDeviceReport(response); return 200; } diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index 8f403ed85..8a577e5d3 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -2085,6 +2085,21 @@ bool WebAPIRequestMapper::validateDeviceSettings( 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 { return false;