diff options
author | Tom Rondeau | 2011-12-14 22:23:50 -0500 |
---|---|---|
committer | Tom Rondeau | 2011-12-14 22:23:50 -0500 |
commit | e4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3 (patch) | |
tree | f9a6452c60bd030b8f9b1d198abf304d78b67d0e /gr-uhd/examples/usrp_nbfm_rcv.py | |
parent | aa0cca173047fc268eb3acfcb7cc8cbb2d8c7581 (diff) | |
download | gnuradio-e4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3.tar.gz gnuradio-e4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3.tar.bz2 gnuradio-e4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3.zip |
uhd: fixes to instantiating UHD devices to set the antenna and subdevice properly (patch from Sam Bretheim).
Diffstat (limited to 'gr-uhd/examples/usrp_nbfm_rcv.py')
-rwxr-xr-x | gr-uhd/examples/usrp_nbfm_rcv.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/usrp_nbfm_rcv.py b/gr-uhd/examples/usrp_nbfm_rcv.py index 7e15abbcf..6fdf95a30 100755 --- a/gr-uhd/examples/usrp_nbfm_rcv.py +++ b/gr-uhd/examples/usrp_nbfm_rcv.py @@ -268,6 +268,14 @@ class receive_path(gr.hier_block2): self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32')) + # Set the subdevice spec + if(spec): + self.u.set_subdev_spec(spec, 0) + + # Set the antenna + if(antenna): + self.u.set_antenna(antenna, 0) + self.if_rate = 256e3 self.quad_rate = 64e3 self.audio_rate = 32e3 @@ -320,14 +328,6 @@ class receive_path(gr.hier_block2): s = self.squelch_range() self.set_squelch((s[0]+s[1])/2) - # Set the subdevice spec - if(spec): - self.u.set_subdev_spec(spec, 0) - - # Set the antenna - if(antenna): - self.u.set_antenna(antenna, 0) - def volume_range(self): return (-20.0, 0.0, 0.5) |