summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/python/fm_tx4.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/fm_tx4.py
parent463b962fe280c5515947498b4d0f4fd3b5993662 (diff)
all: Python, GRC, and examples to properly pull blocks from filter and analog.
Diffstat (limited to 'gr-uhd/examples/python/fm_tx4.py')
-rwxr-xr-xgr-uhd/examples/python/fm_tx4.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/gr-uhd/examples/python/fm_tx4.py b/gr-uhd/examples/python/fm_tx4.py
index 255b436f56..ae3e1b94f3 100755
--- a/gr-uhd/examples/python/fm_tx4.py
+++ b/gr-uhd/examples/python/fm_tx4.py
@@ -34,7 +34,7 @@ audio_to_file.py
from gnuradio import gr, eng_notation
from gnuradio import uhd
-from gnuradio import blks2
+from gnuradio import analog
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import math
@@ -62,19 +62,19 @@ class pipeline(gr.hier_block2):
sys.exit(1)
print audio_rate, if_rate
- fmtx = blks2.nbfm_tx (audio_rate, if_rate, max_dev=5e3, tau=75e-6)
+ fmtx = analog.nbfm_tx(audio_rate, if_rate, max_dev=5e3, tau=75e-6)
# Local oscillator
- lo = gr.sig_source_c (if_rate, # sample rate
- gr.GR_SIN_WAVE, # waveform type
- lo_freq, #frequency
- 1.0, # amplitude
- 0) # DC Offset
- mixer = gr.multiply_cc ()
-
- self.connect (src, fmtx, (mixer, 0))
- self.connect (lo, (mixer, 1))
- self.connect (mixer, self)
+ lo = analog.sig_source_c(if_rate, # sample rate
+ analog.GR_SIN_WAVE, # waveform type
+ lo_freq, # frequency
+ 1.0, # amplitude
+ 0) # DC Offset
+ mixer = gr.multiply_cc()
+
+ self.connect(src, fmtx, (mixer, 0))
+ self.connect(lo, (mixer, 1))
+ self.connect(mixer, self)
class fm_tx_block(stdgui2.std_top_block):
def __init__(self, frame, panel, vbox, argv):