Allow the user to set which antenna to use on the sub device
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.
This commit is contained in:
parent
b21e36db2f
commit
c3dacc667e
@ -63,6 +63,8 @@ class adsb_rx_block (gr.top_block):
|
|||||||
if(options.rx_subdev_spec is None):
|
if(options.rx_subdev_spec is None):
|
||||||
options.rx_subdev_spec = ""
|
options.rx_subdev_spec = ""
|
||||||
self.u.set_subdev_spec(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)
|
self.u.set_samp_rate(rate)
|
||||||
rate = int(self.u.get_samp_rate()) #retrieve actual
|
rate = int(self.u.get_samp_rate()) #retrieve actual
|
||||||
@ -114,6 +116,8 @@ if __name__ == '__main__':
|
|||||||
parser = OptionParser(option_class=eng_option, usage=usage)
|
parser = OptionParser(option_class=eng_option, usage=usage)
|
||||||
parser.add_option("-R", "--rx-subdev-spec", type="string",
|
parser.add_option("-R", "--rx-subdev-spec", type="string",
|
||||||
help="select USRP Rx side A or B", metavar="SUBDEV")
|
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,
|
parser.add_option("-f", "--freq", type="eng_float", default=1090e6,
|
||||||
help="set receive frequency in Hz [default=%default]", metavar="FREQ")
|
help="set receive frequency in Hz [default=%default]", metavar="FREQ")
|
||||||
parser.add_option("-g", "--gain", type="int", default=None,
|
parser.add_option("-g", "--gain", type="int", default=None,
|
||||||
|
Loading…
Reference in New Issue
Block a user