diff options
author | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-11-17 02:38:41 +0000 |
---|---|---|
committer | trondeau <trondeau@221aa14e-8319-0410-a670-987f0aec2ac5> | 2008-11-17 02:38:41 +0000 |
commit | 6e263b3dc7853a5965e6aa51f8abcbc8180a9e6c (patch) | |
tree | c16a1fe8289dc20134a6fb589255cd6b473c613a /gnuradio-examples/python/digital/receive_path.py | |
parent | 5bf8dd44be83bf7e3eec21067f01ab7fc2cd031a (diff) |
Added ability to select USRP board to digital examples
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10003 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/digital/receive_path.py')
-rw-r--r-- | gnuradio-examples/python/digital/receive_path.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gnuradio-examples/python/digital/receive_path.py b/gnuradio-examples/python/digital/receive_path.py index 29f1f834dd..32d02e4d0d 100644 --- a/gnuradio-examples/python/digital/receive_path.py +++ b/gnuradio-examples/python/digital/receive_path.py @@ -42,6 +42,7 @@ class receive_path(gr.hier_block2): options = copy.copy(options) # make a copy so we can destructively modify + self._which = options.which # the USRP board attached self._verbose = options.verbose self._rx_freq = options.rx_freq # receiver's center frequency self._rx_gain = options.rx_gain # receiver's gain @@ -124,7 +125,8 @@ class receive_path(gr.hier_block2): self.connect(self.u, self.chan_filt, self.packet_receiver) def _setup_usrp_source(self): - self.u = usrp.source_c (fusb_block_size=self._fusb_block_size, + self.u = usrp.source_c (self._which, + fusb_block_size=self._fusb_block_size, fusb_nblocks=self._fusb_nblocks) adc_rate = self.u.adc_rate() @@ -213,6 +215,8 @@ class receive_path(gr.hier_block2): if not normal.has_option("--bitrate"): normal.add_option("-r", "--bitrate", type="eng_float", default=None, help="specify bitrate. samples-per-symbol and interp/decim will be derived.") + normal.add_option("-w", "--which", type="int", default=0, + help="select USRP board [default=%default]") normal.add_option("-R", "--rx-subdev-spec", type="subdev", default=None, help="select USRP Rx side A or B") normal.add_option("", "--rx-gain", type="eng_float", default=None, metavar="GAIN", |