From: matt Date: Sun, 10 Feb 2008 23:36:53 +0000 (+0000) Subject: allow for iq swap on TX side as well X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=1eeb01e36a6f0c622b7779aba3c29942b21a79fa;p=debian%2Fgnuradio allow for iq swap on TX side as well git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@7626 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/gr-usrp/src/db_base.py b/gr-usrp/src/db_base.py index 787d4c3c..947f8155 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 f149a3ff..d5eb1d5a 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):