laforge
/
openbts-osmo
Archived
1
0
Fork 0

uhd: remove I/Q swap from radio interface

There should be a better way to do this. Only the USRP1 option
in non-loopback mode needs the swap.

UHD   & !SWLOOPBACK: FLIP_IQ = 0
UHD   &  SWLOOPBACK: FLIP_IQ = 0
USRP1 & !SWLOOPBACK: FLIP_IQ = 1
USRP1 &  SWLOOPBACK: FLIP_IQ = 0

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
This commit is contained in:
Thomas Tsou 2010-11-15 20:03:03 -05:00
parent fb852969db
commit af2ded3b01
1 changed files with 10 additions and 1 deletions

View File

@ -23,6 +23,7 @@
*/
//#define NDEBUG
#include "config.h"
#include "radioInterface.h"
#include <Logger.h>
@ -97,11 +98,19 @@ signalVector *RadioInterface::unUSRPifyVector(short *shortVector, int numSamples
signalVector::iterator itr = newVector->begin();
short *shortItr = shortVector;
// need to flip I and Q from USRP
// This is hideous.
// UHD & !SWLOOPBACK: FLIP_IQ = 0
// UHD & SWLOOPBACK: FLIP_IQ = 0
// USRP1 & !SWLOOPBACK: FLIP_IQ = 1
// USRP1 & SWLOOPBACK: FLIP_IQ = 0
#ifdef USE_UHD
#define FLIP_IQ 0
#else
#ifndef SWLOOPBACK
#define FLIP_IQ 1
#else
#define FLIP_IQ 0
#endif
#endif
while (itr < newVector->end()) {