diff options
author | matt | 2008-02-10 23:36:53 +0000 |
---|---|---|
committer | matt | 2008-02-10 23:36:53 +0000 |
commit | 1eeb01e36a6f0c622b7779aba3c29942b21a79fa (patch) | |
tree | 1119139ed537c91c72741245b2942fb995df6eca /gr-usrp/src | |
parent | d11295c32942e2eab2a4b5f377f073b5483fc840 (diff) | |
download | gnuradio-1eeb01e36a6f0c622b7779aba3c29942b21a79fa.tar.gz gnuradio-1eeb01e36a6f0c622b7779aba3c29942b21a79fa.tar.bz2 gnuradio-1eeb01e36a6f0c622b7779aba3c29942b21a79fa.zip |
allow for iq swap on TX side as well
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7626 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-usrp/src')
-rw-r--r-- | gr-usrp/src/db_base.py | 3 | ||||
-rw-r--r-- | gr-usrp/src/usrp.py | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gr-usrp/src/db_base.py b/gr-usrp/src/db_base.py index 787d4c3c3..947f81559 100644 --- a/gr-usrp/src/db_base.py +++ b/gr-usrp/src/db_base.py @@ -214,7 +214,8 @@ class db_base(object): def i_and_q_swapped(self): """ - Return True if this is a quadrature device and ADC 0 is Q. + Return True if this is a quadrature device and (for RX) ADC 0 is Q + or (for TX) DAC 0 is Q """ return False diff --git a/gr-usrp/src/usrp.py b/gr-usrp/src/usrp.py index f149a3ff8..d5eb1d5a2 100644 --- a/gr-usrp/src/usrp.py +++ b/gr-usrp/src/usrp.py @@ -367,11 +367,15 @@ def determine_tx_mux_value(u, subdev_spec): # determine the value manually. side = subdev_spec[0] # side A = 0, side B = 1 - if not(side in (0, 1)): raise ValueError, "Invalid subdev_spec: %r:" % (subdev_spec,) - return gru.hexint([0x0098, 0x9800][side]) + db = u.db[side] + + if(db[0].i_and_q_swapped()): + return gru.hexint([0x0089, 0x8900][side]) + else: + return gru.hexint([0x0098, 0x9800][side]) def selected_subdev(u, subdev_spec): |