summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/usrp_tv_rcv_nogui.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/examples/usrp_tv_rcv_nogui.py')
-rwxr-xr-xgr-uhd/examples/usrp_tv_rcv_nogui.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gr-uhd/examples/usrp_tv_rcv_nogui.py b/gr-uhd/examples/usrp_tv_rcv_nogui.py
index 3fe426fbc..2324eb29e 100755
--- a/gr-uhd/examples/usrp_tv_rcv_nogui.py
+++ b/gr-uhd/examples/usrp_tv_rcv_nogui.py
@@ -61,6 +61,8 @@ class my_top_block(gr.top_block):
parser = OptionParser(option_class=eng_option, usage=usage)
parser.add_option("-a", "--args", type="string", default="",
help="UHD device address args [default=%default]")
+ parser.add_option("", "--spec", type="string", default=None,
+ help="Subdevice of UHD device where appropriate")
parser.add_option("-A", "--antenna", type="string", default=None,
help="select Rx Antenna where appropriate")
parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
@@ -148,6 +150,15 @@ class my_top_block(gr.top_block):
if not r:
sys.stderr.write('Failed to set frequency\n')
raise SystemExit, 1
+
+ # Set the subdevice spec
+ if(options.spec):
+ self.u.set_subdev_spec(options.spec, 0)
+
+ # Set the antenna
+ if(options.antenna):
+ self.u.set_antenna(options.antenna, 0)
+
self.agc = gr.agc_cc(1e-7,1.0,1.0) #1e-7
self.am_demod = gr.complex_to_mag ()