From d841c4e554653bc347810ec264b879b61c81cbd8 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 2 May 2019 09:54:08 +0200 Subject: [PATCH] Local Sink/Input: REST API fixes --- plugins/channelrx/localsink/localsink.cpp | 2 ++ plugins/samplesource/localinput/localinput.cpp | 3 ++- sdrbase/resources/res.qrc | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/channelrx/localsink/localsink.cpp b/plugins/channelrx/localsink/localsink.cpp index 22acc2ac3..2933a0c0c 100644 --- a/plugins/channelrx/localsink/localsink.cpp +++ b/plugins/channelrx/localsink/localsink.cpp @@ -346,6 +346,8 @@ int LocalSink::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; + response.setLocalSinkSettings(new SWGSDRangel::SWGLocalSinkSettings()); + response.getLocalSinkSettings()->init(); webapiFormatChannelSettings(response, m_settings); return 200; } diff --git a/plugins/samplesource/localinput/localinput.cpp b/plugins/samplesource/localinput/localinput.cpp index 0e97efa71..b74649c7a 100644 --- a/plugins/samplesource/localinput/localinput.cpp +++ b/plugins/samplesource/localinput/localinput.cpp @@ -389,7 +389,8 @@ int LocalInput::webapiReportGet( void LocalInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response) { - (void) response; + response.getLocalInputReport()->setCenterFrequency(m_centerFrequency); + response.getLocalInputReport()->setSampleRate(m_sampleRate); } void LocalInput::webapiReverseSendSettings(QList& deviceSettingsKeys, const LocalInputSettings& settings, bool force) diff --git a/sdrbase/resources/res.qrc b/sdrbase/resources/res.qrc index cdb9a6e78..4b7d46ea0 100644 --- a/sdrbase/resources/res.qrc +++ b/sdrbase/resources/res.qrc @@ -25,6 +25,7 @@ webapi/doc/swagger/include/Perseus.yaml webapi/doc/swagger/include/PlutoSdr.yaml webapi/doc/swagger/include/RtlSdr.yaml + webapi/doc/swagger/include/LocalSink.yaml webapi/doc/swagger/include/RemoteSink.yaml webapi/doc/swagger/include/RemoteSource.yaml webapi/doc/swagger/include/RemoteInput.yaml