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_wfm_rcv_pll.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_wfm_rcv_pll.py')
-rwxr-xr-x | gr-uhd/examples/usrp_wfm_rcv_pll.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/usrp_wfm_rcv_pll.py b/gr-uhd/examples/usrp_wfm_rcv_pll.py index 383670c75..b0744b00b 100755 --- a/gr-uhd/examples/usrp_wfm_rcv_pll.py +++ b/gr-uhd/examples/usrp_wfm_rcv_pll.py @@ -73,6 +73,14 @@ class wfm_rx_block (stdgui2.std_top_block): # build graph self.u = uhd.usrp_source(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) + usrp_rate = 320e3 demod_rate = 320e3 audio_rate = 48e3 @@ -149,14 +157,6 @@ class wfm_rx_block (stdgui2.std_top_block): if not(self.set_freq(options.freq)): self._set_status_msg("Failed to set initial frequency") - # 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) - def _set_status_msg(self, msg, which=0): self.frame.GetStatusBar().SetStatusText(msg, which) |