summaryrefslogtreecommitdiff
path: root/gr-uhd/examples/python
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-11-06 14:28:22 -0500
committerTom Rondeau <trondeau@vt.edu>2012-11-06 14:40:43 -0500
commitfd110bdbbe8bc40781c34f33c70deec5b7931109 (patch)
treeef18e813add19b09c57cc21cb672ea602701405b /gr-uhd/examples/python
parent0c9c16fb008b02a5af39fb22e18acfff2dbd933a (diff)
analog: Removing reference to gr.sig_source_X and gr.noise_source_X where possible.
Passing make and make test. Examples and apps need testing. gr-filter relies on sig_source and noise_source, so can't remove them from core.
Diffstat (limited to 'gr-uhd/examples/python')
-rwxr-xr-xgr-uhd/examples/python/max_power.py11
-rwxr-xr-xgr-uhd/examples/python/usrp_tv_rcv.py6
2 files changed, 9 insertions, 8 deletions
diff --git a/gr-uhd/examples/python/max_power.py b/gr-uhd/examples/python/max_power.py
index 5d23f16afc..79fe120641 100755
--- a/gr-uhd/examples/python/max_power.py
+++ b/gr-uhd/examples/python/max_power.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2004,2007,2011 Free Software Foundation, Inc.
+# Copyright 2004,2007,2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -26,6 +26,7 @@ Setup USRP for maximum power consumption.
from gnuradio import gr
+from gnuradio import analog
from gnuradio import uhd
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -63,9 +64,9 @@ class build_block(gr.top_block):
self.u_tx = uhd.usrp_sink(device_addr=args, stream_args=stream_args)
self.u_tx.set_samp_rate(MAX_RATE)
- self.tx_src0 = gr.sig_source_c(self.u_tx.get_samp_rate(),
- gr.GR_CONST_WAVE,
- 0, 1.0, 0)
+ self.tx_src0 = analog.sig_source_c(self.u_tx.get_samp_rate(),
+ analog.GR_CONST_WAVE,
+ 0, 1.0, 0)
# Get dboard gain range and select maximum
tx_gain_range = self.u_tx.get_gain_range()
@@ -94,7 +95,7 @@ class build_block(gr.top_block):
self.u_rx = uhd.usrp_source(device_addr=args,
io_type=uhd.io_type.COMPLEX_FLOAT32,
num_channels=rx_nchan)
- self.rx_dst0 = gr.null_sink (gr.sizeof_gr_complex)
+ self.rx_dst0 = gr.null_sink(gr.sizeof_gr_complex)
self.u_rx.set_samp_rate(MAX_RATE)
diff --git a/gr-uhd/examples/python/usrp_tv_rcv.py b/gr-uhd/examples/python/usrp_tv_rcv.py
index 794fec4e1f..0d0ddf531f 100755
--- a/gr-uhd/examples/python/usrp_tv_rcv.py
+++ b/gr-uhd/examples/python/usrp_tv_rcv.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
#
@@ -244,8 +244,8 @@ class tv_rx_block (stdgui2.std_top_block):
self.invert_and_scale, self.set_blacklevel,
f2uc, self.dst)
else: # process_type=='do_test_image':
- src_vertical_bars = gr.sig_source_f (usrp_rate, gr.GR_SIN_WAVE,
- 10.0 *usrp_rate/320, 255,128)
+ src_vertical_bars = analog.sig_source_f(usrp_rate, analog.GR_SIN_WAVE,
+ 10.0 *usrp_rate/320, 255,128)
self.connect(src_vertical_bars, f2uc, self.dst)
self._build_gui(vbox, usrp_rate, usrp_rate, usrp_rate)