diff options
author | jblum | 2009-02-17 23:03:39 +0000 |
---|---|---|
committer | jblum | 2009-02-17 23:03:39 +0000 |
commit | 9030fb71746966a9ef6eb6ae2dc0aebdc6016987 (patch) | |
tree | a2f6a296048eeb1363cd8c77b68b36177473c1b4 /grc/src/grc_gnuradio/usrp/dual_usrp.py | |
parent | eb2648dc72e7edb0adb0d810fc4166633c26aea0 (diff) | |
download | gnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.tar.gz gnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.tar.bz2 gnuradio-9030fb71746966a9ef6eb6ae2dc0aebdc6016987.zip |
usrp methods for computing the mux for dual subdevices
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10457 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/grc_gnuradio/usrp/dual_usrp.py')
-rw-r--r-- | grc/src/grc_gnuradio/usrp/dual_usrp.py | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/grc/src/grc_gnuradio/usrp/dual_usrp.py b/grc/src/grc_gnuradio/usrp/dual_usrp.py index 47449ae78..f12b5348d 100644 --- a/grc/src/grc_gnuradio/usrp/dual_usrp.py +++ b/grc/src/grc_gnuradio/usrp/dual_usrp.py @@ -42,16 +42,11 @@ class _dual_source(gr.hier_block2): ) #create usrp object self._make_usrp(which=which, nchan=2) - #get the mux for side A subdev_spec_a = common.to_spec('A', rx_ant_a) - self._subdev_a = usrp.selected_subdev(self._get_u(), subdev_spec_a) - mux_a = usrp.determine_rx_mux_value(self._get_u(), subdev_spec_a) - #get the mux for side B subdev_spec_b = common.to_spec('B', rx_ant_b) - self._subdev_b = usrp.selected_subdev(self._get_u(), subdev_spec_b) - mux_b = usrp.determine_rx_mux_value(self._get_u(), subdev_spec_b) - #move the lower byte of the mux b into the second byte of the mux a - self._get_u().set_mux(((mux_b & 0xff) << 8) | (mux_a - (mux_a & 0xff00))) + self._get_u().set_mux(self._get_u().determine_rx_mux_value(subdev_spec_a, subdev_spec_b)) + self._subdev_a = self._get_u().selected_subdev(subdev_spec_a) + self._subdev_b = self._get_u().selected_subdev(subdev_spec_b) #connect deinter = gr.deinterleave(self._get_io_size()) self.connect(self._get_u(), deinter) @@ -97,16 +92,11 @@ class _dual_sink(gr.hier_block2): ) #create usrp object self._make_usrp(which=which, nchan=2) - #get the mux for side A subdev_spec_a = common.to_spec('A') - self._subdev_a = usrp.selected_subdev(self._get_u(), subdev_spec_a) - mux_a = usrp.determine_tx_mux_value(self._get_u(), subdev_spec_a) - #get the mux for side B subdev_spec_b = common.to_spec('B') - self._subdev_b = usrp.selected_subdev(self._get_u(), subdev_spec_b) - mux_b = usrp.determine_tx_mux_value(self._get_u(), subdev_spec_b) - #set the mux - self._get_u().set_mux(mux_a | mux_b) + self._get_u().set_mux(self._get_u().determine_tx_mux_value(subdev_spec_a, subdev_spec_b)) + self._subdev_a = self._get_u().selected_subdev(subdev_spec_a) + self._subdev_b = self._get_u().selected_subdev(subdev_spec_b) #connect inter = gr.interleave(self._get_io_size()) self.connect(inter, self._get_u()) |