summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/usrp_wfm_rcv.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/examples/usrp_wfm_rcv.py')
-rwxr-xr-xgr-uhd/examples/usrp_wfm_rcv.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/usrp_wfm_rcv.py b/gr-uhd/examples/usrp_wfm_rcv.py
index a4abdd2a7..f6c5cf853 100755
--- a/gr-uhd/examples/usrp_wfm_rcv.py
+++ b/gr-uhd/examples/usrp_wfm_rcv.py
@@ -71,6 +71,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 = 32e3
@@ -129,14 +137,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)