summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/usrp_am_mw_rcv.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-uhd/examples/usrp_am_mw_rcv.py')
-rwxr-xr-xgr-uhd/examples/usrp_am_mw_rcv.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/gr-uhd/examples/usrp_am_mw_rcv.py b/gr-uhd/examples/usrp_am_mw_rcv.py
index 31fe9af70..85ffd7632 100755
--- a/gr-uhd/examples/usrp_am_mw_rcv.py
+++ b/gr-uhd/examples/usrp_am_mw_rcv.py
@@ -28,7 +28,6 @@ from gnuradio.eng_option import eng_option
from gnuradio.wxgui import slider, powermate
from gnuradio.wxgui import stdgui2, fftsink2, form
from optparse import OptionParser
-from usrpm import usrp_dbid
import sys
import math
import wx
@@ -77,6 +76,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 = 256e3
demod_rate = 64e3
audio_rate = 32e3
@@ -150,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)