mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 13:47:01 -04:00
REST API: config: GET (11). Support of the rest of devices
This commit is contained in:
@@ -1442,7 +1442,26 @@ int LimeSDRInput::webapiSettingsPutPatch(
|
||||
{
|
||||
(void) errorMessage;
|
||||
LimeSDRInputSettings settings = m_settings;
|
||||
webapiUpdateDeviceSettings(settings, deviceSettingsKeys, response);
|
||||
|
||||
MsgConfigureLimeSDR *msg = MsgConfigureLimeSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureLimeSDR *msgToGUI = MsgConfigureLimeSDR::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
webapiFormatDeviceSettings(response, settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
void LimeSDRInput::webapiUpdateDeviceSettings(
|
||||
LimeSDRInputSettings& settings,
|
||||
const QStringList& deviceSettingsKeys,
|
||||
SWGSDRangel::SWGDeviceSettings& response)
|
||||
{
|
||||
if (deviceSettingsKeys.contains("antennaPath")) {
|
||||
settings.m_antennaPath = (LimeSDRInputSettings::PathRFE) response.getLimeSdrInputSettings()->getAntennaPath();
|
||||
}
|
||||
@@ -1527,18 +1546,6 @@ int LimeSDRInput::webapiSettingsPutPatch(
|
||||
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getLimeSdrInputSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureLimeSDR *msg = MsgConfigureLimeSDR::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureLimeSDR *msgToGUI = MsgConfigureLimeSDR::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
webapiFormatDeviceSettings(response, settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
void LimeSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const LimeSDRInputSettings& settings)
|
||||
|
||||
Reference in New Issue
Block a user