Revision 3e7ca8bf gr-uhd/apps/uhd_fft.py
| b/gr-uhd/apps/uhd_fft.py | ||
|---|---|---|
| 45 | 45 |
self.panel = panel |
| 46 | 46 |
|
| 47 | 47 |
parser = OptionParser(option_class=eng_option) |
| 48 |
parser.add_option("-a", "--address", type="string",
|
|
| 49 |
default="addr=192.168.10.2", |
|
| 50 |
help="Address of UHD device, [default=%default]") |
|
| 48 |
parser.add_option("-a", "--args", type="string", default="",
|
|
| 49 |
help="UHD device address args , [default=%default]") |
|
| 50 |
parser.add_option("", "--spec", type="string", default=None,
|
|
| 51 |
help="Subdevice of UHD device where appropriate") |
|
| 51 | 52 |
parser.add_option("-A", "--antenna", type="string", default=None,
|
| 52 | 53 |
help="select Rx Antenna where appropriate") |
| 53 | 54 |
parser.add_option("-s", "--samp-rate", type="eng_float", default=1e6,
|
| ... | ... | |
| 73 | 74 |
self.options = options |
| 74 | 75 |
self.show_debug_info = True |
| 75 | 76 |
|
| 76 |
self.u = uhd.usrp_source(device_addr=options.address,
|
|
| 77 |
self.u = uhd.usrp_source(device_addr=options.args,
|
|
| 77 | 78 |
io_type=uhd.io_type.COMPLEX_FLOAT32, |
| 78 | 79 |
num_channels=1) |
| 79 | 80 |
|
| ... | ... | |
| 118 | 119 |
|
| 119 | 120 |
self.set_gain(options.gain) |
| 120 | 121 |
|
| 122 |
# Set the subdevice spec |
|
| 123 |
if(options.spec): |
|
| 124 |
self.u.set_subdev_spec(options.spec, 0) |
|
| 125 |
|
|
| 126 |
# Set the antenna |
|
| 121 | 127 |
if(options.antenna): |
| 122 | 128 |
self.u.set_antenna(options.antenna, 0) |
| 123 | 129 |
|
Also available in: Unified diff