Skip to content

Commit

Permalink
Allow the user to set which antenna to use on the sub device
Browse files Browse the repository at this point in the history
So .. from the terminal, "-A RX2", would set the device to use the RX2
antenna.The UHD manual will define your options. If the user puts in a
bad selection, it will complain and list the options.
  • Loading branch information
Zack Moratto committed Jul 2, 2011
1 parent b21e36d commit c3dacc6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/python/uhd_modes.py
Expand Up @@ -63,6 +63,8 @@ def __init__(self, options, args, queue):
if(options.rx_subdev_spec is None):
options.rx_subdev_spec = ""
self.u.set_subdev_spec(options.rx_subdev_spec)
if not options.antenna is None:
self.u.set_antenna(options.antenna)

self.u.set_samp_rate(rate)
rate = int(self.u.get_samp_rate()) #retrieve actual
Expand Down Expand Up @@ -114,6 +116,8 @@ def tune(self, freq):
parser = OptionParser(option_class=eng_option, usage=usage)
parser.add_option("-R", "--rx-subdev-spec", type="string",
help="select USRP Rx side A or B", metavar="SUBDEV")
parser.add_option("-A", "--antenna", type="string",
help="select which antenna to use on daughterboard")
parser.add_option("-f", "--freq", type="eng_float", default=1090e6,
help="set receive frequency in Hz [default=%default]", metavar="FREQ")
parser.add_option("-g", "--gain", type="int", default=None,
Expand Down

0 comments on commit c3dacc6

Please sign in to comment.