summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 12:26:57 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 13:05:26 -0500
commit0c9c16fb008b02a5af39fb22e18acfff2dbd933a (patch)
tree2a1d555a5b496f84eaf7f360b1cc50b64ab0fd03 /gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
parent463b962fe280c5515947498b4d0f4fd3b5993662 (diff)
all: Python, GRC, and examples to properly pull blocks from filter and analog.
Diffstat (limited to 'gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py')
-rwxr-xr-xgr-uhd/examples/python/usrp_wfm_rcv_fmdet.py32
1 files changed, 17 insertions, 15 deletions
diff --git a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
index b794825727..97bd2b2d32 100755
--- a/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
+++ b/gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2005-2007,2011 Free Software Foundation, Inc.
+# Copyright 2005-2007,2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -20,7 +20,9 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, optfir, audio, blks2, uhd
+from gnuradio import gr, audio, uhd
+from gnuradio import filter
+from gnuradio import analog
from gnuradio.eng_option import eng_option
from gnuradio.wxgui import slider, powermate
from gnuradio.wxgui import stdgui2, fftsink2, form, scopesink2
@@ -90,31 +92,31 @@ class wfm_rx_block (stdgui2.std_top_block):
dev_rate = self.u.get_samp_rate()
nfilts = 32
- chan_coeffs = gr.firdes.low_pass_2(10*nfilts, # gain
- nfilts*usrp_rate, # sampling rate
- 90e3, # passband cutoff
- 30e3, # transition bw
- 70) # stopband attenuation
+ chan_coeffs = filter.firdes.low_pass_2(10*nfilts, # gain
+ nfilts*usrp_rate, # sampling rate
+ 90e3, # passband cutoff
+ 30e3, # transition bw
+ 70) # stopband attenuation
rrate = usrp_rate / dev_rate
- self.chan_filt = blks2.pfb_arb_resampler_ccf(rrate, chan_coeffs, nfilts)
+ self.chan_filt = filter.pfb.arb_resampler_ccf(rrate, chan_coeffs, nfilts)
- self.guts = blks2.wfm_rcv_fmdet (demod_rate, audio_decim)
+ self.guts = analog.wfm_rcv_fmdet (demod_rate, audio_decim)
chan_rate = audio_rate / (demod_rate/audio_decim)
- self.rchan_filt = blks2.pfb_arb_resampler_fff(chan_rate)
- self.lchan_filt = blks2.pfb_arb_resampler_fff(chan_rate)
+ self.rchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
+ self.lchan_filt = filter.pfb.arb_resampler_fff(chan_rate)
# FIXME rework {add,multiply}_const_* to handle multiple streams
self.volume_control_l = gr.multiply_const_ff(self.vol)
self.volume_control_r = gr.multiply_const_ff(self.vol)
# sound card as final sink
- self.audio_sink = audio.sink (int (audio_rate),
- options.audio_output,
- False) # ok_to_block
+ self.audio_sink = audio.sink(int (audio_rate),
+ options.audio_output,
+ False) # ok_to_block
# now wire it all together
- self.connect (self.u, self.chan_filt, self.guts)
+ self.connect(self.u, self.chan_filt, self.guts)
self.connect((self.guts, 0), self.lchan_filt,
self.volume_control_l, (self.audio_sink,0))
self.connect((self.guts, 1), self.rchan_filt,