Skip to content

Commit

Permalink
Airspy and AirspyHF: fixed apply use reverse API. Part of #1329
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Oct 22, 2022
1 parent f9abe86 commit 2eeadfe
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions plugins/samplesource/airspy/airspyinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ bool AirspyInput::applySettings(const AirspySettings& settings, const QList<QStr
}
}

if (settings.m_useReverseAPI)
if (settingsKeys.contains("useReverseAPI"))
{
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||
(m_settings.m_reverseAPIAddress != settings.m_reverseAPIAddress) ||
(m_settings.m_reverseAPIPort != settings.m_reverseAPIPort) ||
(m_settings.m_reverseAPIDeviceIndex != settings.m_reverseAPIDeviceIndex);
bool fullUpdate = (settingsKeys.contains("useReverseAPI") && settings.m_useReverseAPI) ||
settingsKeys.contains("reverseAPIAddress") ||
settingsKeys.contains("reverseAPIPort") ||
settingsKeys.contains("reverseAPIDeviceIndex");
webapiReverseSendSettings(settingsKeys, settings, fullUpdate || force);
}

Expand Down
12 changes: 6 additions & 6 deletions plugins/samplesource/airspyhf/airspyhfinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,13 +548,13 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, const QList<
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
}

if (settings.m_useReverseAPI)
if (settingsKeys.contains("useReverseAPI"))
{
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||
(m_settings.m_reverseAPIAddress != settings.m_reverseAPIAddress) ||
(m_settings.m_reverseAPIPort != settings.m_reverseAPIPort) ||
(m_settings.m_reverseAPIDeviceIndex != settings.m_reverseAPIDeviceIndex);
webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force);
bool fullUpdate = (settingsKeys.contains("useReverseAPI") && settings.m_useReverseAPI) ||
settingsKeys.contains("reverseAPIAddress") ||
settingsKeys.contains("reverseAPIPort") ||
settingsKeys.contains("reverseAPIDeviceIndex");
webapiReverseSendSettings(settingsKeys, settings, fullUpdate || force);
}

if (force) {
Expand Down

0 comments on commit 2eeadfe

Please sign in to comment.