From fd110bdbbe8bc40781c34f33c70deec5b7931109 Mon Sep 17 00:00:00 2001 From: Tom Rondeau <trondeau@vt.edu> Date: Tue, 6 Nov 2012 14:28:22 -0500 Subject: 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. --- gr-filter/examples/resampler.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'gr-filter/examples/resampler.py') diff --git a/gr-filter/examples/resampler.py b/gr-filter/examples/resampler.py index 395e095cbd..d5fd9216f6 100755 --- a/gr-filter/examples/resampler.py +++ b/gr-filter/examples/resampler.py @@ -24,16 +24,22 @@ from gnuradio import gr from gnuradio import filter import sys +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + try: import scipy except ImportError: - print "Error: Program requires scipy (see: www.scipy.org)." + sys.stderr.write("Error: Program requires scipy (see: www.scipy.org).\n") sys.exit(1) try: import pylab except ImportError: - print "Error: Program requires matplotlib (see: matplotlib.sourceforge.net)." + sys.stderr.write("Error: Program requires matplotlib (see: matplotlib.sourceforge.net).\n") sys.exit(1) class mytb(gr.top_block): @@ -46,8 +52,8 @@ class mytb(gr.top_block): # Creating our own taps taps = gr.firdes.low_pass_2(32, 32, 0.25, 0.1, 80) - self.src = gr.sig_source_c(fs_in, gr.GR_SIN_WAVE, fc, 1) - #self.src = gr.noise_source_c(gr.GR_GAUSSIAN, 1) + self.src = analog.sig_source_c(fs_in, analog..GR_SIN_WAVE, fc, 1) + #self.src = analog..noise_source_c(analog..GR_GAUSSIAN, 1) self.head = gr.head(gr.sizeof_gr_complex, N) # A resampler with our taps -- cgit v1.2.3