summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorMarcus Leech2012-02-20 17:34:01 -0500
committerTom Rondeau2012-02-20 17:34:01 -0500
commit5977d9006bd7c81a35e347f946e5e7983145ff0c (patch)
tree7bccaea813bb6cfd79fd8e7eb38dd8ab324377a9 /gr-uhd
parent991c8f4bb0c897decb0a62d15b3e44316a46cf95 (diff)
downloadgnuradio-5977d9006bd7c81a35e347f946e5e7983145ff0c.tar.gz
gnuradio-5977d9006bd7c81a35e347f946e5e7983145ff0c.tar.bz2
gnuradio-5977d9006bd7c81a35e347f946e5e7983145ff0c.zip
uhd: updated uhd programs to use stream_args concept from command line for more than just setting the scalar.
Diffstat (limited to 'gr-uhd')
-rwxr-xr-xgr-uhd/apps/uhd_fft.py7
-rwxr-xr-xgr-uhd/apps/uhd_rx_cfile.py9
2 files changed, 7 insertions, 9 deletions
diff --git a/gr-uhd/apps/uhd_fft.py b/gr-uhd/apps/uhd_fft.py
index 18edc8f86..39ba3838e 100755
--- a/gr-uhd/apps/uhd_fft.py
+++ b/gr-uhd/apps/uhd_fft.py
@@ -73,8 +73,8 @@ class app_top_block(stdgui2.std_top_block):
help="Set FFT update rate, [default=%default]")
parser.add_option("", "--wire-format", type="string", default="sc16",
help="Set wire format from USRP [default=%default]")
- parser.add_option("", "--scalar", type="int", default=1024,
- help="Set scalar multiplier value sc8 wire format [default=%default]")
+ parser.add_option("", "--stream-args", type="string", default="",
+ help="Set additional stream args [default=%default]")
parser.add_option("", "--show-async-msg", action="store_true", default=False,
help="Show asynchronous message notifications from UHD [default=%default]")
(options, args) = parser.parse_args()
@@ -84,10 +84,9 @@ class app_top_block(stdgui2.std_top_block):
self.options = options
self.show_debug_info = True
- scalar="scalar="+str(options.scalar)
self.u = uhd.usrp_source(device_addr=options.args,
stream_args=uhd.stream_args(cpu_format='fc32',
- otw_format=options.wire_format, args=scalar))
+ otw_format=options.wire_format, args=options.stream_args))
# Set the subdevice spec
if(options.spec):
diff --git a/gr-uhd/apps/uhd_rx_cfile.py b/gr-uhd/apps/uhd_rx_cfile.py
index 718bb80b7..a61361e43 100755
--- a/gr-uhd/apps/uhd_rx_cfile.py
+++ b/gr-uhd/apps/uhd_rx_cfile.py
@@ -39,15 +39,14 @@ class rx_cfile_block(gr.top_block):
def __init__(self, options, filename):
gr.top_block.__init__(self)
- scalar="scalar="+str(options.scalar)
# Create a UHD device source
if options.output_shorts:
self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('sc16',
- options.wire_format, args=scalar))
+ options.wire_format, args=options.stream_args))
self._sink = gr.file_sink(gr.sizeof_short*2, filename)
else:
self._u = uhd.usrp_source(device_addr=options.args, stream_args=uhd.stream_args('fc32',
- options.wire_format, args=scalar))
+ options.wire_format, args=options.stream_args))
self._sink = gr.file_sink(gr.sizeof_gr_complex, filename)
# Set the subdevice spec
@@ -143,8 +142,8 @@ def get_options():
help="set daughterboard LO offset to OFFSET [default=hw default]")
parser.add_option("", "--wire-format", type="string", default="sc16",
help="set wire format from USRP [default=%default")
- parser.add_option("", "--scalar", type="int", default=1024,
- help="set scalar multiplier value for sc8 wire format [default=%default]")
+ parser.add_option("", "--stream-args", type="string", default="",
+ help="set stream arguments [default=%default]")
parser.add_option("", "--show-async-msg", action="store_true", default=False,
help="Show asynchronous message notifications from UHD [default=%default]")