mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
SDRdaemon: Web API: implemented daemonSettingsGet
This commit is contained in:
parent
b38d47a082
commit
dcfb405dd5
@ -179,8 +179,26 @@ int WebAPIAdapterDaemon::daemonSettingsGet(
|
||||
SWGSDRangel::SWGErrorResponse& error)
|
||||
{
|
||||
error.init();
|
||||
*error.getMessage() = "Not implemented";
|
||||
return 501;
|
||||
|
||||
if (m_sdrDaemonMain.m_deviceSourceEngine) // Rx
|
||||
{
|
||||
response.setDeviceHwType(new QString(m_sdrDaemonMain.m_deviceSourceAPI->getHardwareId()));
|
||||
response.setTx(0);
|
||||
DeviceSampleSource *source = m_sdrDaemonMain.m_deviceSourceAPI->getSampleSource();
|
||||
return source->webapiSettingsGet(response, *error.getMessage());
|
||||
}
|
||||
else if (m_sdrDaemonMain.m_deviceSinkEngine) // Tx
|
||||
{
|
||||
response.setDeviceHwType(new QString(m_sdrDaemonMain.m_deviceSinkAPI->getHardwareId()));
|
||||
response.setTx(1);
|
||||
DeviceSampleSink *sink = m_sdrDaemonMain.m_deviceSinkAPI->getSampleSink();
|
||||
return sink->webapiSettingsGet(response, *error.getMessage());
|
||||
}
|
||||
else
|
||||
{
|
||||
*error.getMessage() = QString("Device error");
|
||||
return 500;
|
||||
}
|
||||
}
|
||||
|
||||
int WebAPIAdapterDaemon::daemonSettingsPutPatch(
|
||||
|
Loading…
Reference in New Issue
Block a user