diff options
author | Tom Rondeau <trondeau@vt.edu> | 2011-12-14 22:23:50 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2011-12-14 22:23:50 -0500 |
commit | e4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3 (patch) | |
tree | f9a6452c60bd030b8f9b1d198abf304d78b67d0e /gr-uhd/examples/fm_tx4.py | |
parent | aa0cca173047fc268eb3acfcb7cc8cbb2d8c7581 (diff) |
uhd: fixes to instantiating UHD devices to set the antenna and subdevice properly (patch from Sam Bretheim).
Diffstat (limited to 'gr-uhd/examples/fm_tx4.py')
-rwxr-xr-x | gr-uhd/examples/fm_tx4.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/fm_tx4.py b/gr-uhd/examples/fm_tx4.py index 2972e728d3..aecb35b542 100755 --- a/gr-uhd/examples/fm_tx4.py +++ b/gr-uhd/examples/fm_tx4.py @@ -118,6 +118,14 @@ class fm_tx_block(stdgui2.std_top_block): self.u = uhd.usrp_sink(device_addr=options.args, stream_args=uhd.stream_args('fc32')) + # 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.usrp_rate = options.samp_rate self.u.set_samp_rate(self.usrp_rate) self.usrp_rate = self.u.get_samp_rate() @@ -133,14 +141,6 @@ class fm_tx_block(stdgui2.std_top_block): self.set_gain(options.gain) self.set_freq(options.freq) - # 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.sum = gr.add_cc () # Instantiate N NBFM channels |