From 1b2c6d60bd8bcbe9d097269164fbb429669f51e9 Mon Sep 17 00:00:00 2001 From: c vw Date: Mon, 15 Nov 2021 13:49:18 +0100 Subject: [PATCH] Apply "iqswap" to the tx iq samples as well --- soapy_protocol.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/soapy_protocol.c b/soapy_protocol.c index 1c111ef..7797784 100644 --- a/soapy_protocol.c +++ b/soapy_protocol.c @@ -408,8 +408,16 @@ void soapy_protocol_iq_samples(float isample,float qsample) { long long timeNs=0; long timeoutUs=100000L; if(isTransmitting()) { - output_buffer[(output_buffer_index*2)]=isample; - output_buffer[(output_buffer_index*2)+1]=qsample; + if (iqswap) { + // + // Here I assume that iqswap also applies to the TX samples + // + output_buffer[(output_buffer_index*2)]=qsample; + output_buffer[(output_buffer_index*2)+1]=isample; + } else { + output_buffer[(output_buffer_index*2)]=isample; + output_buffer[(output_buffer_index*2)+1]=qsample; + } output_buffer_index++; if(output_buffer_index>=max_tx_samples) { int elements=SoapySDRDevice_writeStream(soapy_device,tx_stream,tx_buffs,max_tx_samples,&flags,timeNs,timeoutUs); -- 2.45.2