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:
parent
fb852969db
commit
af2ded3b01
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#define NDEBUG
|
//#define NDEBUG
|
||||||
|
#include "config.h"
|
||||||
#include "radioInterface.h"
|
#include "radioInterface.h"
|
||||||
#include <Logger.h>
|
#include <Logger.h>
|
||||||
|
|
||||||
|
@ -97,11 +98,19 @@ signalVector *RadioInterface::unUSRPifyVector(short *shortVector, int numSamples
|
||||||
signalVector::iterator itr = newVector->begin();
|
signalVector::iterator itr = newVector->begin();
|
||||||
short *shortItr = shortVector;
|
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
|
#ifndef SWLOOPBACK
|
||||||
#define FLIP_IQ 1
|
#define FLIP_IQ 1
|
||||||
#else
|
#else
|
||||||
#define FLIP_IQ 0
|
#define FLIP_IQ 0
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while (itr < newVector->end()) {
|
while (itr < newVector->end()) {
|
||||||
|
|
Reference in New Issue