summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/usrp_wfm_rcv_nogui.py
diff options
context:
space:
mode:
authorTom Rondeau2011-12-14 22:24:44 -0500
committerTom Rondeau2011-12-14 22:24:44 -0500
commit25c494b347a9e0c411c8cff0101f6c7c656464f0 (patch)
tree60b7598b4c5d56366eb8230ca12b1610bab3cc8c /gr-uhd/examples/usrp_wfm_rcv_nogui.py
parent1f29a384ecd6512f5cb0891dbd651aca8ced86ed (diff)
parentf395bd639c64ea7b61d1e5091f5af0b419a5b3a2 (diff)
downloadgnuradio-25c494b347a9e0c411c8cff0101f6c7c656464f0.tar.gz
gnuradio-25c494b347a9e0c411c8cff0101f6c7c656464f0.tar.bz2
gnuradio-25c494b347a9e0c411c8cff0101f6c7c656464f0.zip
Merge branch 'master' into next
Diffstat (limited to 'gr-uhd/examples/usrp_wfm_rcv_nogui.py')
-rwxr-xr-xgr-uhd/examples/usrp_wfm_rcv_nogui.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-uhd/examples/usrp_wfm_rcv_nogui.py b/gr-uhd/examples/usrp_wfm_rcv_nogui.py
index 498d2dec6..f0195bcb5 100755
--- a/gr-uhd/examples/usrp_wfm_rcv_nogui.py
+++ b/gr-uhd/examples/usrp_wfm_rcv_nogui.py
@@ -65,6 +65,14 @@ class wfm_rx_block (gr.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
@@ -119,14 +127,6 @@ class wfm_rx_block (gr.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_vol (self, vol):
g = self.volume_range()
self.vol = max(g[0], min(g[1], vol))