1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 13:47:01 -04:00

IQ swap: REST API: implementation in plugins

This commit is contained in:
f4exb
2020-06-22 02:10:35 +02:00
parent 05dbe94ae5
commit 836ba63c72
14 changed files with 104 additions and 0 deletions
@@ -790,6 +790,9 @@ void SDRPlayInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getSdrPlaySettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getSdrPlaySettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos"))
{
int fcPos = response.getSdrPlaySettings()->getFcPos();
@@ -841,6 +844,7 @@ void SDRPlayInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
response.getSdrPlaySettings()->setBandwidthIndex(settings.m_bandwidthIndex);
response.getSdrPlaySettings()->setDevSampleRateIndex(settings.m_devSampleRateIndex);
response.getSdrPlaySettings()->setLog2Decim(settings.m_log2Decim);
response.getSdrPlaySettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getSdrPlaySettings()->setFcPos((int) settings.m_fcPos);
response.getSdrPlaySettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
response.getSdrPlaySettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
@@ -950,6 +954,9 @@ void SDRPlayInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgSDRPlaySettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgSDRPlaySettings->setIqOrder(settings.m_iqOrder);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgSDRPlaySettings->setFcPos((int) settings.m_fcPos);
}