long timeoutUs=100000L;
if(isTransmitting()) {
//
- // Seemingly "iqswap" ONLY applies to the RX samples. So
- // the check on "iqswap" should *not* be made here (???)
+ // The "iqswap" logic has now been removed from transmitter.c
+ // and moved here, because this is where it is also handled
+ // upon RX.
//
- //if (iqswap) {
- // output_buffer[(output_buffer_index*2)]=qsample;
- // output_buffer[(output_buffer_index*2)+1]=isample;
- //} else {
+ if (iqswap) {
+ 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);
//
for(j=0;j<tx->output_samples;j++) {
double is,qs;
- if(iqswap) {
- qs=tx->iq_output_buffer[j*2];
- is=tx->iq_output_buffer[(j*2)+1];
- } else {
- is=tx->iq_output_buffer[j*2];
- qs=tx->iq_output_buffer[(j*2)+1];
- }
+ is=tx->iq_output_buffer[j*2];
+ qs=tx->iq_output_buffer[(j*2)+1];
isample=is>=0.0?(long)floor(is*gain+0.5):(long)ceil(is*gain-0.5);
qsample=qs>=0.0?(long)floor(qs*gain+0.5):(long)ceil(qs*gain-0.5);
switch(protocol) {