1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-17 23:28:50 -05:00

IQ swap: REST API: implementation in plugins

This commit is contained in:
f4exb 2020-06-22 02:10:35 +02:00
parent db870cbecd
commit c4136c6a44
14 changed files with 104 additions and 0 deletions

View File

@ -715,6 +715,9 @@ void AirspyInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getAirspySettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getAirspySettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
int fcPos = response.getAirspySettings()->getFcPos();
fcPos = fcPos < 0 ? 0 : fcPos > 2 ? 2 : fcPos;
@ -805,6 +808,7 @@ void AirspyInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
response.getAirspySettings()->setLnaAgc(settings.m_lnaAGC ? 1 : 0);
response.getAirspySettings()->setMixerAgc(settings.m_mixerAGC ? 1 : 0);
response.getAirspySettings()->setLog2Decim(settings.m_log2Decim);
response.getAirspySettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getAirspySettings()->setFcPos((int) settings.m_fcPos);
response.getAirspySettings()->setBiasT(settings.m_biasT ? 1 : 0);
response.getAirspySettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
@ -879,6 +883,9 @@ void AirspyInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgAirspySettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgAirspySettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgAirspySettings->setFcPos((int) settings.m_fcPos);
}

View File

@ -705,6 +705,9 @@ void AirspyHFInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getAirspyHfSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getAirspyHfSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("transverterDeltaFrequency")) {
settings.m_transverterDeltaFrequency = response.getAirspyHfSettings()->getTransverterDeltaFrequency();
}
@ -758,6 +761,7 @@ void AirspyHFInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getAirspyHfSettings()->setDevSampleRateIndex(settings.m_devSampleRateIndex);
response.getAirspyHfSettings()->setLOppmTenths(settings.m_LOppmTenths);
response.getAirspyHfSettings()->setLog2Decim(settings.m_log2Decim);
response.getAirspyHfSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getAirspyHfSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
response.getAirspyHfSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0);
response.getAirspyHfSettings()->setBandIndex(settings.m_bandIndex ? 1 : 0);
@ -891,6 +895,9 @@ void AirspyHFInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgAirspyHFSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgAirspyHFSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("transverterDeltaFrequency") || force) {
swgAirspyHFSettings->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency);
}

View File

@ -599,6 +599,7 @@ bool Bladerf1Input::applySettings(const BladeRF1InputSettings& settings, bool fo
<< " m_vga1: " << m_settings.m_vga1
<< " m_vga2: " << m_settings.m_vga2
<< " m_log2Decim: " << m_settings.m_log2Decim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_fcPos: " << m_settings.m_fcPos
<< " m_devSampleRate: " << m_settings.m_devSampleRate
<< " m_dcBlock: " << m_settings.m_dcBlock
@ -646,6 +647,7 @@ void Bladerf1Input::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getBladeRf1InputSettings()->setVga2(settings.m_vga2);
response.getBladeRf1InputSettings()->setBandwidth(settings.m_bandwidth);
response.getBladeRf1InputSettings()->setLog2Decim(settings.m_log2Decim);
response.getBladeRf1InputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getBladeRf1InputSettings()->setFcPos((int) settings.m_fcPos);
response.getBladeRf1InputSettings()->setXb200(settings.m_xb200 ? 1 : 0);
response.getBladeRf1InputSettings()->setXb200Path((int) settings.m_xb200Path);
@ -720,6 +722,9 @@ void Bladerf1Input::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getBladeRf1InputSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getBladeRf1InputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
settings.m_fcPos = static_cast<BladeRF1InputSettings::fcPos_t>(response.getBladeRf1InputSettings()->getFcPos());
}
@ -846,6 +851,9 @@ void Bladerf1Input::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgBladeRF1Settings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgBladeRF1Settings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgBladeRF1Settings->setFcPos((int) settings.m_fcPos);
}

View File

@ -1033,6 +1033,7 @@ bool BladeRF2Input::applySettings(const BladeRF2InputSettings& settings, bool fo
<< " m_LOppmTenths: " << m_settings.m_LOppmTenths
<< " m_bandwidth: " << m_settings.m_bandwidth
<< " m_log2Decim: " << m_settings.m_log2Decim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_fcPos: " << m_settings.m_fcPos
<< " m_devSampleRate: " << m_settings.m_devSampleRate
<< " m_globalGain: " << m_settings.m_globalGain
@ -1098,6 +1099,9 @@ void BladeRF2Input::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getBladeRf2InputSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getBladeRf2InputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
settings.m_fcPos = static_cast<BladeRF2InputSettings::fcPos_t>(response.getBladeRf2InputSettings()->getFcPos());
}
@ -1155,6 +1159,7 @@ void BladeRF2Input::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getBladeRf2InputSettings()->setDevSampleRate(settings.m_devSampleRate);
response.getBladeRf2InputSettings()->setBandwidth(settings.m_bandwidth);
response.getBladeRf2InputSettings()->setLog2Decim(settings.m_log2Decim);
response.getBladeRf2InputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getBladeRf2InputSettings()->setFcPos((int) settings.m_fcPos);
response.getBladeRf2InputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
response.getBladeRf2InputSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
@ -1312,6 +1317,9 @@ void BladeRF2Input::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgBladeRF2Settings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgBladeRF2Settings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgBladeRF2Settings->setFcPos((int) settings.m_fcPos);
}

View File

@ -991,6 +991,9 @@ void FCDProInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getFcdProSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getFcdProSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
settings.m_fcPos = (FCDProSettings::fcPos_t) response.getFcdProSettings()->getFcPos();
}
@ -1048,6 +1051,7 @@ void FCDProInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
response.getFcdProSettings()->setGain5Index(settings.m_gain5Index);
response.getFcdProSettings()->setGain6Index(settings.m_gain6Index);
response.getFcdProSettings()->setLog2Decim(settings.m_log2Decim);
response.getFcdProSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getFcdProSettings()->setFcPos((int) settings.m_fcPos);
response.getFcdProSettings()->setRcFilterIndex(settings.m_rcFilterIndex);
response.getFcdProSettings()->setIfFilterIndex(settings.m_ifFilterIndex);
@ -1136,6 +1140,9 @@ void FCDProInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgFCDProSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgFCDProSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgFCDProSettings->setFcPos(settings.m_fcPos);
}

View File

@ -673,6 +673,9 @@ void FCDProPlusInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getFcdProPlusSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getFcdProPlusSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
settings.m_fcPos = (FCDProPlusSettings::fcPos_t) response.getFcdProPlusSettings()->getFcPos();
}
@ -733,6 +736,7 @@ void FCDProPlusInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings&
{
response.getFcdProPlusSettings()->setCenterFrequency(settings.m_centerFrequency);
response.getFcdProPlusSettings()->setLog2Decim(settings.m_log2Decim);
response.getFcdProPlusSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getFcdProPlusSettings()->setFcPos((int) settings.m_fcPos);
response.getFcdProPlusSettings()->setRangeLow(settings.m_rangeLow ? 1 : 0);
response.getFcdProPlusSettings()->setLnaGain(settings.m_lnaGain ? 1 : 0);
@ -782,6 +786,9 @@ void FCDProPlusInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKe
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgFCDProPlusSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgFCDProPlusSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgFCDProPlusSettings->setFcPos((int) settings.m_fcPos);
}

View File

@ -593,6 +593,7 @@ bool HackRFInput::applySettings(const HackRFInputSettings& settings, bool force)
<< " m_lnaGain: " << m_settings.m_lnaGain
<< " m_vgaGain: " << m_settings.m_vgaGain
<< " m_log2Decim: " << m_settings.m_log2Decim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_fcPos: " << m_settings.m_fcPos
<< " m_devSampleRate: " << m_settings.m_devSampleRate
<< " m_biasT: " << m_settings.m_biasT
@ -659,6 +660,9 @@ void HackRFInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getHackRfInputSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getHackRfInputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos"))
{
int fcPos = response.getHackRfInputSettings()->getFcPos();
@ -711,6 +715,7 @@ void HackRFInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
response.getHackRfInputSettings()->setLnaGain(settings.m_lnaGain);
response.getHackRfInputSettings()->setVgaGain(settings.m_vgaGain);
response.getHackRfInputSettings()->setLog2Decim(settings.m_log2Decim);
response.getHackRfInputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getHackRfInputSettings()->setFcPos(settings.m_fcPos);
response.getHackRfInputSettings()->setDevSampleRate(settings.m_devSampleRate);
response.getHackRfInputSettings()->setBiasT(settings.m_biasT ? 1 : 0);
@ -826,6 +831,9 @@ void HackRFInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgHackRFInputSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgHackRFInputSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgHackRFInputSettings->setFcPos((int) settings.m_fcPos);
}

View File

@ -1413,6 +1413,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
<< " ADC sample rate with hard decimation: " << loc.toString(m_settings.m_devSampleRate*(1<<m_settings.m_log2HardDecim)) << "S/s"
<< " m_log2HardDecim: " << m_settings.m_log2HardDecim
<< " m_log2SoftDecim: " << m_settings.m_log2SoftDecim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_gain: " << m_settings.m_gain
<< " m_lpfBW: " << loc.toString(static_cast<int>(m_settings.m_lpfBW))
<< " m_lpfFIRBW: " << loc.toString(static_cast<int>(m_settings.m_lpfFIRBW))
@ -1507,6 +1508,9 @@ void LimeSDRInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2SoftDecim")) {
settings.m_log2SoftDecim = response.getLimeSdrInputSettings()->getLog2SoftDecim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getLimeSdrInputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("lpfBW")) {
settings.m_lpfBW = response.getLimeSdrInputSettings()->getLpfBw();
}
@ -1571,6 +1575,7 @@ void LimeSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
response.getLimeSdrInputSettings()->setLnaGain(settings.m_lnaGain);
response.getLimeSdrInputSettings()->setLog2HardDecim(settings.m_log2HardDecim);
response.getLimeSdrInputSettings()->setLog2SoftDecim(settings.m_log2SoftDecim);
response.getLimeSdrInputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getLimeSdrInputSettings()->setLpfBw(settings.m_lpfBW);
response.getLimeSdrInputSettings()->setLpfFirEnable(settings.m_lpfFIREnable ? 1 : 0);
response.getLimeSdrInputSettings()->setLpfFirbw(settings.m_lpfFIRBW);
@ -1758,6 +1763,9 @@ void LimeSDRInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2SoftDecim") || force) {
swgLimeSdrInputSettings->setLog2SoftDecim(settings.m_log2SoftDecim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgLimeSdrInputSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("lpfBW") || force) {
swgLimeSdrInputSettings->setLpfBw(settings.m_lpfBW);
}

View File

@ -451,6 +451,7 @@ bool PerseusInput::applySettings(const PerseusSettings& settings, bool force)
<< " m_LOppmTenths: " << m_settings.m_LOppmTenths
<< " m_devSampleRateIndex: " << m_settings.m_devSampleRateIndex
<< " m_log2Decim: " << m_settings.m_log2Decim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_transverterMode: " << m_settings.m_transverterMode
<< " m_transverterDeltaFrequency: " << m_settings.m_transverterDeltaFrequency
<< " m_adcDither: " << m_settings.m_adcDither
@ -571,6 +572,9 @@ void PerseusInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getPerseusSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getPerseusSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("adcDither")) {
settings.m_adcDither = response.getPerseusSettings()->getAdcDither() != 0;
}
@ -625,6 +629,7 @@ void PerseusInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& re
response.getPerseusSettings()->setLOppmTenths(settings.m_LOppmTenths);
response.getPerseusSettings()->setDevSampleRateIndex(settings.m_devSampleRateIndex);
response.getPerseusSettings()->setLog2Decim(settings.m_log2Decim);
response.getPerseusSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getPerseusSettings()->setAdcDither(settings.m_adcDither ? 1 : 0);
response.getPerseusSettings()->setAdcPreamp(settings.m_adcPreamp ? 1 : 0);
response.getPerseusSettings()->setWideBand(settings.m_wideBand ? 1 : 0);
@ -684,6 +689,9 @@ void PerseusInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgPerseusSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgPerseusSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("adcDither") || force) {
swgPerseusSettings->setAdcDither(settings.m_adcDither ? 1 : 0);
}

View File

@ -960,6 +960,9 @@ void PlutoSDRInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getPlutoSdrInputSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getPlutoSdrInputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("lpfBW")) {
settings.m_lpfBW = response.getPlutoSdrInputSettings()->getLpfBw();
}
@ -1057,6 +1060,7 @@ void PlutoSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getPlutoSdrInputSettings()->setHwRfdcBlock(settings.m_hwRFDCBlock ? 1 : 0);
response.getPlutoSdrInputSettings()->setHwIqCorrection(settings.m_hwIQCorrection ? 1 : 0);
response.getPlutoSdrInputSettings()->setLog2Decim(settings.m_log2Decim);
response.getPlutoSdrInputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getPlutoSdrInputSettings()->setLpfBw(settings.m_lpfBW);
response.getPlutoSdrInputSettings()->setGain(settings.m_gain);
response.getPlutoSdrInputSettings()->setAntennaPath((int) settings.m_antennaPath);
@ -1148,6 +1152,9 @@ void PlutoSDRInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgPlutoSdrInputSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgPlutoSdrInputSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("lpfBW") || force) {
swgPlutoSdrInputSettings->setLpfBw(settings.m_lpfBW);
}

View File

@ -655,6 +655,9 @@ void RTLSDRInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getRtlSdrSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getRtlSdrSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("lowSampleRate")) {
settings.m_lowSampleRate = response.getRtlSdrSettings()->getLowSampleRate() != 0;
}
@ -701,6 +704,7 @@ void RTLSDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& res
response.getRtlSdrSettings()->setIqImbalance(settings.m_iqImbalance ? 1 : 0);
response.getRtlSdrSettings()->setLoPpmCorrection(settings.m_loPpmCorrection);
response.getRtlSdrSettings()->setLog2Decim(settings.m_log2Decim);
response.getRtlSdrSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getRtlSdrSettings()->setLowSampleRate(settings.m_lowSampleRate ? 1 : 0);
response.getRtlSdrSettings()->setNoModMode(settings.m_noModMode ? 1 : 0);
response.getRtlSdrSettings()->setOffsetTuning(settings.m_offsetTuning ? 1 : 0);
@ -845,6 +849,9 @@ void RTLSDRInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys,
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgRtlSdrSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgRtlSdrSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("lowSampleRate") || force) {
swgRtlSdrSettings->setLowSampleRate(settings.m_lowSampleRate);
}

View File

@ -773,6 +773,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();
@ -824,6 +827,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);
@ -933,6 +937,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);
}

View File

@ -1371,6 +1371,7 @@ bool SoapySDRInput::applySettings(const SoapySDRInputSettings& settings, bool fo
<< " m_centerFrequency: " << m_settings.m_centerFrequency << " Hz"
<< " m_LOppmTenths: " << m_settings.m_LOppmTenths
<< " m_log2Decim: " << m_settings.m_log2Decim
<< " m_iqOrder: " << m_settings.m_iqOrder
<< " m_fcPos: " << m_settings.m_fcPos
<< " m_devSampleRate: " << m_settings.m_devSampleRate
<< " m_softDCCorrection: " << m_settings.m_softDCCorrection
@ -1473,6 +1474,9 @@ void SoapySDRInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2Decim")) {
settings.m_log2Decim = response.getSoapySdrInputSettings()->getLog2Decim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getSoapySdrInputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("fcPos")) {
settings.m_fcPos = static_cast<SoapySDRInputSettings::fcPos_t>(response.getSoapySdrInputSettings()->getFcPos());
}
@ -1681,6 +1685,7 @@ void SoapySDRInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& r
response.getSoapySdrInputSettings()->setLOppmTenths(settings.m_LOppmTenths);
response.getSoapySdrInputSettings()->setDevSampleRate(settings.m_devSampleRate);
response.getSoapySdrInputSettings()->setLog2Decim(settings.m_log2Decim);
response.getSoapySdrInputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getSoapySdrInputSettings()->setFcPos((int) settings.m_fcPos);
response.getSoapySdrInputSettings()->setSoftDcCorrection(settings.m_softDCCorrection ? 1 : 0);
response.getSoapySdrInputSettings()->setSoftIqCorrection(settings.m_softIQCorrection ? 1 : 0);
@ -2002,6 +2007,9 @@ void SoapySDRInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys
if (deviceSettingsKeys.contains("log2Decim") || force) {
swgSoapySDRInputSettings->setLog2Decim(settings.m_log2Decim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgSoapySDRInputSettings->setIqOrder(settings.m_iqOrder);
}
if (deviceSettingsKeys.contains("fcPos") || force) {
swgSoapySDRInputSettings->setFcPos((int) settings.m_fcPos);
}

View File

@ -1375,6 +1375,9 @@ void XTRXInput::webapiUpdateDeviceSettings(
if (deviceSettingsKeys.contains("log2SoftDecim")) {
settings.m_log2SoftDecim = response.getXtrxInputSettings()->getLog2SoftDecim();
}
if (deviceSettingsKeys.contains("iqOrder")) {
settings.m_iqOrder = response.getXtrxInputSettings()->getIqOrder() != 0;
}
if (deviceSettingsKeys.contains("lpfBW")) {
settings.m_lpfBW = response.getXtrxInputSettings()->getLpfBw();
}
@ -1436,6 +1439,7 @@ void XTRXInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& respo
response.getXtrxInputSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0);
response.getXtrxInputSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0);
response.getXtrxInputSettings()->setLog2SoftDecim(settings.m_log2SoftDecim);
response.getXtrxInputSettings()->setIqOrder(settings.m_iqOrder ? 1 : 0);
response.getXtrxInputSettings()->setLpfBw(settings.m_lpfBW);
response.getXtrxInputSettings()->setGain(settings.m_gain);
response.getXtrxInputSettings()->setNcoEnable(settings.m_ncoEnable ? 1 : 0);
@ -1591,6 +1595,9 @@ void XTRXInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, co
if (deviceSettingsKeys.contains("log2SoftDecim") || force) {
swgXtrxInputSettings->setLog2SoftDecim(settings.m_log2SoftDecim);
}
if (deviceSettingsKeys.contains("iqOrder") || force) {
swgXtrxInputSettings->setIqOrder(settings.m_iqOrder ? 1 : 0);
}
if (deviceSettingsKeys.contains("ncoEnable") || force) {
swgXtrxInputSettings->setNcoEnable(settings.m_ncoEnable ? 1 : 0);
}