diff options
Diffstat (limited to 'gr-uhd/examples/usrp_tv_rcv.py')
-rwxr-xr-x | gr-uhd/examples/usrp_tv_rcv.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gr-uhd/examples/usrp_tv_rcv.py b/gr-uhd/examples/usrp_tv_rcv.py index 2ad1f2122..22493dd00 100755 --- a/gr-uhd/examples/usrp_tv_rcv.py +++ b/gr-uhd/examples/usrp_tv_rcv.py @@ -64,6 +64,8 @@ class tv_rx_block (stdgui2.std_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, @@ -143,7 +145,15 @@ class tv_rx_block (stdgui2.std_top_block): self.src=self.u - self.gain = options.gain + # 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.gain = options.gain f2uc=gr.float_to_uchar() |