diff options
Diffstat (limited to 'gnuradio-examples')
-rw-r--r-- | gnuradio-examples/c++/Makefile.am | 4 | ||||
-rwxr-xr-x | gnuradio-examples/python/apps/hf_explorer/hfx2.py | 4 | ||||
-rw-r--r-- | gnuradio-examples/python/dect/usrp_source.py | 4 | ||||
-rwxr-xr-x | gnuradio-examples/python/digital-bert/benchmark_tx.py | 2 | ||||
-rw-r--r-- | gnuradio-examples/python/digital/transmit_path.py | 2 | ||||
-rwxr-xr-x | gnuradio-examples/python/multi-antenna/multi_fft.py | 10 | ||||
-rwxr-xr-x | gnuradio-examples/python/multi-antenna/multi_file.py | 10 | ||||
-rwxr-xr-x | gnuradio-examples/python/multi-antenna/multi_scope.py | 10 | ||||
-rwxr-xr-x | gnuradio-examples/python/multi_usrp/multi_usrp_oscope.py | 4 | ||||
-rwxr-xr-x | gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py | 2 | ||||
-rwxr-xr-x | gnuradio-examples/python/ofdm/tunnel.py | 4 | ||||
-rwxr-xr-x | gnuradio-examples/python/usrp/fm_tx4.py | 14 | ||||
-rwxr-xr-x | gnuradio-examples/python/usrp/fm_tx_2_daughterboards.py | 4 | ||||
-rwxr-xr-x | gnuradio-examples/python/usrp/usrp_nbfm_ptt.py | 2 |
14 files changed, 38 insertions, 38 deletions
diff --git a/gnuradio-examples/c++/Makefile.am b/gnuradio-examples/c++/Makefile.am index 5ac086075..43c63847a 100644 --- a/gnuradio-examples/c++/Makefile.am +++ b/gnuradio-examples/c++/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2006 Free Software Foundation, Inc. +# Copyright 2006,2008 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -20,4 +20,4 @@ # include $(top_srcdir)/Makefile.common -# SUBDIRS = dial_tone +#SUBDIRS = dial_tone diff --git a/gnuradio-examples/python/apps/hf_explorer/hfx2.py b/gnuradio-examples/python/apps/hf_explorer/hfx2.py index 00b1eddfd..00a3b9047 100755 --- a/gnuradio-examples/python/apps/hf_explorer/hfx2.py +++ b/gnuradio-examples/python/apps/hf_explorer/hfx2.py @@ -118,9 +118,9 @@ def pick_subdevice(u): If there's a daughterboard on B, select B. Otherwise, select A. """ - if u.db[0][0].dbid() >= 0: # dbid is < 0 if there's no d'board or a problem + if u.db(0, 0).dbid() >= 0: # dbid is < 0 if there's no d'board or a problem return (0, 0) - if u.db[1][0].dbid() >= 0: + if u.db(1, 0).dbid() >= 0: return (1, 0) return (0, 0) diff --git a/gnuradio-examples/python/dect/usrp_source.py b/gnuradio-examples/python/dect/usrp_source.py index 6a779840f..df19ff278 100644 --- a/gnuradio-examples/python/dect/usrp_source.py +++ b/gnuradio-examples/python/dect/usrp_source.py @@ -64,9 +64,9 @@ class usrp_source_c(gr.hier_block2): If there's a daughterboard on B, select B. Otherwise, select A. """ - if self._u.db[0][0].dbid() >= 0: # dbid is < 0 if there's no d'board or a problem + if self._u.db(0, 0).dbid() >= 0: # dbid is < 0 if there's no d'board or a problem return (0, 0) - if self._u.db[1][0].dbid() >= 0: + if self._u.db(1, 0).dbid() >= 0: return (1, 0) return (0, 0) diff --git a/gnuradio-examples/python/digital-bert/benchmark_tx.py b/gnuradio-examples/python/digital-bert/benchmark_tx.py index 1778a74b5..000f4bca2 100755 --- a/gnuradio-examples/python/digital-bert/benchmark_tx.py +++ b/gnuradio-examples/python/digital-bert/benchmark_tx.py @@ -60,7 +60,7 @@ class tx_bpsk_block(gr.top_block): subdev_spec = usrp.pick_tx_subdevice(self._usrp) self._usrp.set_mux(usrp.determine_tx_mux_value(self._usrp, subdev_spec)) self._subdev = usrp.selected_subdev(self._usrp, subdev_spec) - tr = usrp.tune(self._usrp, self._subdev._which, self._subdev, freq) + tr = usrp.tune(self._usrp, self._subdev.which(), self._subdev, freq) if not (tr): print "Failed to tune to center frequency!" else: diff --git a/gnuradio-examples/python/digital/transmit_path.py b/gnuradio-examples/python/digital/transmit_path.py index 69989606a..250c3f048 100644 --- a/gnuradio-examples/python/digital/transmit_path.py +++ b/gnuradio-examples/python/digital/transmit_path.py @@ -141,7 +141,7 @@ class transmit_path(gr.hier_block2): the result of that operation and our target_frequency to determine the value for the digital up converter. """ - r = self.u.tune(self.subdev._which, self.subdev, target_freq) + r = self.u.tune(self.subdev.which(), self.subdev, target_freq) if r: return True diff --git a/gnuradio-examples/python/multi-antenna/multi_fft.py b/gnuradio-examples/python/multi-antenna/multi_fft.py index 0f1dbb102..54d8286d4 100755 --- a/gnuradio-examples/python/multi-antenna/multi_fft.py +++ b/gnuradio-examples/python/multi-antenna/multi_fft.py @@ -49,9 +49,9 @@ class my_graph(stdgui2.std_top_block): sw_decim = 1 self.u = usrp.source_c(0, options.decim, fpga_filename="std_4rx_0tx.rbf") - if self.u.nddc() < nchan: + if self.u.nddcs() < nchan: sys.stderr.write('This code requires an FPGA build with %d DDCs. This FPGA has only %d.\n' % ( - nchan, self.u.nddc())) + nchan, self.u.nddcs())) raise SystemExit if not self.u.set_nchannels(nchan): @@ -62,11 +62,11 @@ class my_graph(stdgui2.std_top_block): print "USB data rate = %s" % (eng_notation.num_to_str(input_rate),) print "Scope data rate = %s" % (eng_notation.num_to_str(input_rate/sw_decim),) - self.subdev = self.u.db[0] + self.u.db[1] + self.subdev = self.u.db(0) + self.u.db(1) if (len (self.subdev) != 4 or - self.u.db[0][0].dbid() != usrp_dbid.BASIC_RX or - self.u.db[1][0].dbid() != usrp_dbid.BASIC_RX): + self.u.db(0, 0).dbid() != usrp_dbid.BASIC_RX or + self.u.db(0, 0).dbid() != usrp_dbid.BASIC_RX): sys.stderr.write('This code requires a Basic Rx board on Sides A & B\n') sys.exit(1) diff --git a/gnuradio-examples/python/multi-antenna/multi_file.py b/gnuradio-examples/python/multi-antenna/multi_file.py index f887b9cf6..6f09546ea 100755 --- a/gnuradio-examples/python/multi-antenna/multi_file.py +++ b/gnuradio-examples/python/multi-antenna/multi_file.py @@ -54,9 +54,9 @@ class my_graph(gr.top_block): sw_decim = 1 self.u = usrp.source_c(0, options.decim, fpga_filename="std_4rx_0tx.rbf") - if self.u.nddc() < nchan: + if self.u.nddcs() < nchan: sys.stderr.write('This code requires an FPGA build with %d DDCs. This FPGA has only %d.\n' % ( - nchan, self.u.nddc())) + nchan, self.u.nddcs())) raise SystemExit if not self.u.set_nchannels(nchan): @@ -68,11 +68,11 @@ class my_graph(gr.top_block): sink_data_rate = input_rate/sw_decim print "Scope data rate = %s" % (eng_notation.num_to_str(sink_data_rate),) - self.subdev = self.u.db[0] + self.u.db[1] + self.subdev = self.u.db(0) + self.u.db(1) if (len(self.subdev) != 4 or - self.u.db[0][0].dbid() != usrp_dbid.BASIC_RX or - self.u.db[1][0].dbid() != usrp_dbid.BASIC_RX): + self.u.db(0, 0).dbid() != usrp_dbid.BASIC_RX or + self.u.db(1, 0).dbid() != usrp_dbid.BASIC_RX): sys.stderr.write('This code requires a Basic Rx board on Sides A & B\n') sys.exit(1) diff --git a/gnuradio-examples/python/multi-antenna/multi_scope.py b/gnuradio-examples/python/multi-antenna/multi_scope.py index 8db183d6f..5d6b1e920 100755 --- a/gnuradio-examples/python/multi-antenna/multi_scope.py +++ b/gnuradio-examples/python/multi-antenna/multi_scope.py @@ -49,9 +49,9 @@ class my_top_block(stdgui2.std_top_block): sw_decim = 1 self.u = usrp.source_c(0, options.decim, fpga_filename="std_4rx_0tx.rbf") - if self.u.nddc() < nchan: + if self.u.nddcs() < nchan: sys.stderr.write('This code requires an FPGA build with %d DDCs. This FPGA has only %d.\n' % ( - nchan, self.u.nddc())) + nchan, self.u.nddcs())) raise SystemExit if not self.u.set_nchannels(nchan): @@ -62,11 +62,11 @@ class my_top_block(stdgui2.std_top_block): print "USB data rate = %s" % (eng_notation.num_to_str(input_rate),) print "Scope data rate = %s" % (eng_notation.num_to_str(input_rate/sw_decim),) - self.subdev = self.u.db[0] + self.u.db[1] + self.subdev = self.u.db(0) + self.u.db(1) if (len(self.subdev) != 4 or - self.u.db[0][0].dbid() != usrp_dbid.BASIC_RX or - self.u.db[1][0].dbid() != usrp_dbid.BASIC_RX): + self.u.db(0, 0).dbid() != usrp_dbid.BASIC_RX or + self.u.db(0, 0).dbid() != usrp_dbid.BASIC_RX): sys.stderr.write('This code requires a Basic Rx board on Sides A & B\n') sys.exit(1) diff --git a/gnuradio-examples/python/multi_usrp/multi_usrp_oscope.py b/gnuradio-examples/python/multi_usrp/multi_usrp_oscope.py index 3d426b45b..512b125a4 100755 --- a/gnuradio-examples/python/multi_usrp/multi_usrp_oscope.py +++ b/gnuradio-examples/python/multi_usrp/multi_usrp_oscope.py @@ -42,9 +42,9 @@ def pick_subdevice(u): If there's a daughterboard on B, select B. Otherwise, select A. """ - if u.db[0][0].dbid() >= 0: # dbid is < 0 if there's no d'board or a problem + if u.db(0, 0).dbid() >= 0: # dbid is < 0 if there's no d'board or a problem return (0, 0) - if u.db[1][0].dbid() >= 0: + if u.db(0, 0).dbid() >= 0: return (1, 0) return (0, 0) diff --git a/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py b/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py index fb41ab129..918ff0842 100755 --- a/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py +++ b/gnuradio-examples/python/ofdm/benchmark_ofdm_tx.py @@ -98,7 +98,7 @@ class my_top_block(gr.top_block): the result of that operation and our target_frequency to determine the value for the digital up converter. """ - r = self.u.tune(self.subdev._which, self.subdev, target_freq) + r = self.u.tune(self.subdev.which(), self.subdev, target_freq) if r: return True diff --git a/gnuradio-examples/python/ofdm/tunnel.py b/gnuradio-examples/python/ofdm/tunnel.py index 74f0f04d7..7e75c3ee8 100755 --- a/gnuradio-examples/python/ofdm/tunnel.py +++ b/gnuradio-examples/python/ofdm/tunnel.py @@ -182,8 +182,8 @@ class usrp_graph(gr.top_block): the result of that operation and our target_frequency to determine the value for the digital up converter. """ - r_snk = self.u_snk.tune(self.subdev._which, self.subdev, target_freq) - r_src = self.u_src.tune(self.subdev._which, self.subdev, target_freq) + r_snk = self.u_snk.tune(self.subdev.which(), self.subdev, target_freq) + r_src = self.u_src.tune(self.subdev.which(), self.subdev, target_freq) if r_snk and r_src: return True diff --git a/gnuradio-examples/python/usrp/fm_tx4.py b/gnuradio-examples/python/usrp/fm_tx4.py index a71eeaa5a..a51668dde 100755 --- a/gnuradio-examples/python/usrp/fm_tx4.py +++ b/gnuradio-examples/python/usrp/fm_tx4.py @@ -43,7 +43,7 @@ import math import sys from gnuradio.wxgui import stdgui2, fftsink2 -from gnuradio import tx_debug_gui +#from gnuradio import tx_debug_gui import wx @@ -84,8 +84,8 @@ class fm_tx_block(stdgui2.std_top_block): help="set Tx frequency to FREQ [required]", metavar="FREQ") parser.add_option("-n", "--nchannels", type="int", default=4, help="number of Tx channels [1,4]") - parser.add_option("","--debug", action="store_true", default=False, - help="Launch Tx debugger") + #parser.add_option("","--debug", action="store_true", default=False, + # help="Launch Tx debugger") (options, args) = parser.parse_args () if len(args) != 0: @@ -158,9 +158,9 @@ class fm_tx_block(stdgui2.std_top_block): vbox.Add (post_mod.win, 1, wx.EXPAND) - if options.debug: - self.debugger = tx_debug_gui.tx_debug_gui(self.subdev) - self.debugger.Show(True) + #if options.debug: + # self.debugger = tx_debug_gui.tx_debug_gui(self.subdev) + # self.debugger.Show(True) def set_freq(self, target_freq): @@ -177,7 +177,7 @@ class fm_tx_block(stdgui2.std_top_block): any residual_freq to the s/w freq translater. """ - r = self.u.tune(self.subdev._which, self.subdev, target_freq) + r = self.u.tune(self.subdev.which(), self.subdev, target_freq) if r: print "r.baseband_freq =", eng_notation.num_to_str(r.baseband_freq) print "r.dxc_freq =", eng_notation.num_to_str(r.dxc_freq) diff --git a/gnuradio-examples/python/usrp/fm_tx_2_daughterboards.py b/gnuradio-examples/python/usrp/fm_tx_2_daughterboards.py index 499c7230b..15fdf2831 100755 --- a/gnuradio-examples/python/usrp/fm_tx_2_daughterboards.py +++ b/gnuradio-examples/python/usrp/fm_tx_2_daughterboards.py @@ -112,7 +112,7 @@ class my_top_block(gr.top_block): self.usrp_rate = self.dac_rate / self.usrp_interp # 320 kS/s # we're using both daughterboard slots, thus subdev is a 2-tuple - self.subdev = (self.u.db[0][0], self.u.db[1][0]) + self.subdev = (self.u.db(0, 0), self.u.db(1, 0)) print "Using TX d'board %s" % (self.subdev[0].side_and_name(),) print "Using TX d'board %s" % (self.subdev[1].side_and_name(),) @@ -161,7 +161,7 @@ class my_top_block(gr.top_block): """ print "Tuning side %s to %sHz" % (("A", "B")[side], num_to_str(target_freq)) - r = self.u.tune(self.subdev[side]._which, self.subdev[side], target_freq) + r = self.u.tune(self.subdev[side].which(), self.subdev[side], target_freq) if r: print " r.baseband_freq =", num_to_str(r.baseband_freq) print " r.dxc_freq =", num_to_str(r.dxc_freq) diff --git a/gnuradio-examples/python/usrp/usrp_nbfm_ptt.py b/gnuradio-examples/python/usrp/usrp_nbfm_ptt.py index 35f015215..3ce1e0c49 100755 --- a/gnuradio-examples/python/usrp/usrp_nbfm_ptt.py +++ b/gnuradio-examples/python/usrp/usrp_nbfm_ptt.py @@ -337,7 +337,7 @@ class transmit_path(gr.hier_block2): determine the value for the digital up converter. Finally, we feed any residual_freq to the s/w freq translater. """ - r = self.u.tune(self.subdev._which, self.subdev, target_freq) + r = self.u.tune(self.subdev.which(), self.subdev, target_freq) if r: # Use residual_freq in s/w freq translator return True |