summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/usrp_nbfm_ptt.py
diff options
context:
space:
mode:
authorTom Rondeau2011-12-14 22:24:37 -0500
committerTom Rondeau2011-12-14 22:24:37 -0500
commitf395bd639c64ea7b61d1e5091f5af0b419a5b3a2 (patch)
treeb002d23b88a936351008aed8f92b6ba014496871 /gr-uhd/examples/usrp_nbfm_ptt.py
parent7b3e1522274a41bcc3b432817bb02c33b2e4f84c (diff)
parente4cf0d1b51b7bc9843e76e8d6e35097664b6f2b3 (diff)
downloadgnuradio-f395bd639c64ea7b61d1e5091f5af0b419a5b3a2.tar.gz
gnuradio-f395bd639c64ea7b61d1e5091f5af0b419a5b3a2.tar.bz2
gnuradio-f395bd639c64ea7b61d1e5091f5af0b419a5b3a2.zip
Merge branch 'maint'
Diffstat (limited to 'gr-uhd/examples/usrp_nbfm_ptt.py')
-rwxr-xr-xgr-uhd/examples/usrp_nbfm_ptt.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/gr-uhd/examples/usrp_nbfm_ptt.py b/gr-uhd/examples/usrp_nbfm_ptt.py
index 3b28bc2ea..075604af3 100755
--- a/gr-uhd/examples/usrp_nbfm_ptt.py
+++ b/gr-uhd/examples/usrp_nbfm_ptt.py
@@ -28,7 +28,6 @@ from optparse import OptionParser
from gnuradio import gr, audio, blks2, uhd
from gnuradio.eng_option import eng_option
from gnuradio.wxgui import stdgui2, fftsink2, scopesink2, slider, form
-from usrpm import usrp_dbid
from numpy import convolve, array
@@ -283,6 +282,14 @@ class transmit_path(gr.hier_block2):
self.u = uhd.usrp_sink(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 = 320e3
self.audio_rate = 32e3
@@ -333,14 +340,6 @@ class transmit_path(gr.hier_block2):
self.set_enable(False)
- # 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 set_freq(self, target_freq):
"""
Set the center frequency we're interested in.