summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grc/blocks/usrp_dual_source_x.xml36
-rw-r--r--grc/grc_gnuradio/usrp/dual_usrp.py8
2 files changed, 39 insertions, 5 deletions
diff --git a/grc/blocks/usrp_dual_source_x.xml b/grc/blocks/usrp_dual_source_x.xml
index ad9a860ac..07d3174bb 100644
--- a/grc/blocks/usrp_dual_source_x.xml
+++ b/grc/blocks/usrp_dual_source_x.xml
@@ -8,7 +8,11 @@
<name>USRP Dual Source</name>
<key>usrp_dual_source_x</key>
<import>from grc_gnuradio import usrp as grc_usrp</import>
- <make>grc_usrp.dual_source_$(type.fcn)(which=$which, rx_ant_a=$rx_ant_a, rx_ant_b=$rx_ant_b)
+ <make>grc_usrp.dual_source_$(type.fcn)(
+ which=$which,
+ rx_ant_a=$rx_ant_a, rx_ant_b=$rx_ant_b,
+ rx_source_a=$rx_source_a, rx_source_b=$rx_source_b,
+)
#if $format()
self.$(id).set_format(width=$format.width, shift=$format.shift)
#end if
@@ -189,6 +193,36 @@ self.$(id).set_gain_b($gain_b)</make>
<key>RX2</key>
</option>
</param>
+ <param>
+ <name>RX Source A</name>
+ <key>rx_source_a</key>
+ <value>A</value>
+ <type>string</type>
+ <hide>#if $rx_source_a() == 'A' then 'part' else 'none'#</hide>
+ <option>
+ <name>Side A</name>
+ <key>A</key>
+ </option>
+ <option>
+ <name>Side B</name>
+ <key>B</key>
+ </option>
+ </param>
+ <param>
+ <name>RX Source B</name>
+ <key>rx_source_b</key>
+ <value>B</value>
+ <type>string</type>
+ <hide>#if $rx_source_b() == 'B' then 'part' else 'none'#</hide>
+ <option>
+ <name>Side A</name>
+ <key>A</key>
+ </option>
+ <option>
+ <name>Side B</name>
+ <key>B</key>
+ </option>
+ </param>
<source>
<name>Aout</name>
<type>$type</type>
diff --git a/grc/grc_gnuradio/usrp/dual_usrp.py b/grc/grc_gnuradio/usrp/dual_usrp.py
index b26dbddd4..66b76b2df 100644
--- a/grc/grc_gnuradio/usrp/dual_usrp.py
+++ b/grc/grc_gnuradio/usrp/dual_usrp.py
@@ -1,4 +1,4 @@
-# Copyright 2009 Free Software Foundation, Inc.
+# Copyright 2009, 2010 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -27,7 +27,7 @@ from gnuradio import gr
class _dual_source(gr.hier_block2):
"""A dual usrp source of IO type short or complex."""
- def __init__(self, which, rx_ant_a='RXA', rx_ant_b='RXA'):
+ def __init__(self, which, rx_ant_a='RXA', rx_ant_b='RXA', rx_source_a='A', rx_source_b='B'):
"""
USRP dual source contructor.
@param which the unit number
@@ -42,8 +42,8 @@ class _dual_source(gr.hier_block2):
)
#create usrp object
self._make_usrp(which=which, nchan=2)
- subdev_spec_a = common.to_spec('A', rx_ant_a)
- subdev_spec_b = common.to_spec('B', rx_ant_b)
+ subdev_spec_a = common.to_spec(rx_source_a, rx_ant_a)
+ subdev_spec_b = common.to_spec(rx_source_b, rx_ant_b)
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)