summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/python/fm_tx4.py
diff options
context:
space:
mode:
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):