mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-03 14:34:57 -04:00
REST API: config: GET (11). Support of the rest of devices
This commit is contained in:
@@ -795,7 +795,26 @@ int PlutoSDRInput::webapiSettingsPutPatch(
|
||||
{
|
||||
(void) errorMessage;
|
||||
PlutoSDRInputSettings settings = m_settings;
|
||||
webapiUpdateDeviceSettings(settings, deviceSettingsKeys, response);
|
||||
|
||||
MsgConfigurePlutoSDR *msg = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigurePlutoSDR *msgToGUI = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
webapiFormatDeviceSettings(response, settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
void webapiUpdateDeviceSettings(
|
||||
PlutoSDRInputSettings& settings,
|
||||
const QStringList& deviceSettingsKeys,
|
||||
SWGSDRangel::SWGDeviceSettings& response)
|
||||
{
|
||||
if (deviceSettingsKeys.contains("centerFrequency")) {
|
||||
settings.m_centerFrequency = response.getPlutoSdrInputSettings()->getCenterFrequency();
|
||||
}
|
||||
@@ -877,18 +896,6 @@ int PlutoSDRInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getPlutoSdrInputSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigurePlutoSDR *msg = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigurePlutoSDR *msgToGUI = MsgConfigurePlutoSDR::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
webapiFormatDeviceSettings(response, settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
int PlutoSDRInput::webapiReportGet(
|
||||
@@ -920,7 +927,7 @@ void PlutoSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
|
||||
response.getPlutoSdrInputSettings()->setLog2Decim(settings.m_log2Decim);
|
||||
response.getPlutoSdrInputSettings()->setLpfBw(settings.m_lpfBW);
|
||||
response.getPlutoSdrInputSettings()->setGain(settings.m_gain);
|
||||
response.getPlutoSdrInputSettings()->setAntennaPath((int) m_settings.m_antennaPath);
|
||||
response.getPlutoSdrInputSettings()->setAntennaPath((int) settings.m_antennaPath);
|
||||
response.getPlutoSdrInputSettings()->setGainMode((int) settings.m_gainMode);
|
||||
response.getPlutoSdrInputSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
|
||||
response.getPlutoSdrInputSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user