diff options
Diffstat (limited to 'gr-wxgui/src/python/waterfallsink_gl.py')
-rw-r--r-- | gr-wxgui/src/python/waterfallsink_gl.py | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/gr-wxgui/src/python/waterfallsink_gl.py b/gr-wxgui/src/python/waterfallsink_gl.py index b17f292875..050bbb5924 100644 --- a/gr-wxgui/src/python/waterfallsink_gl.py +++ b/gr-wxgui/src/python/waterfallsink_gl.py @@ -1,5 +1,5 @@ # -# Copyright 2008,2009 Free Software Foundation, Inc. +# Copyright 2008,2009,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -25,6 +25,7 @@ import waterfall_window import common from gnuradio import gr, fft +from gnuradio import analog from pubsub import pubsub from constants import * @@ -133,9 +134,9 @@ class waterfall_sink_c(_waterfall_sink_base): import wx from gnuradio.wxgui import stdgui2 -class test_top_block (stdgui2.std_top_block): +class test_top_block(stdgui2.std_top_block): def __init__(self, frame, panel, vbox, argv): - stdgui2.std_top_block.__init__ (self, frame, panel, vbox, argv) + stdgui2.std_top_block.__init__(self, frame, panel, vbox, argv) fft_size = 512 @@ -143,30 +144,30 @@ class test_top_block (stdgui2.std_top_block): input_rate = 20.000e3 # Generate a complex sinusoid - self.src1 = gr.sig_source_c (input_rate, gr.GR_SIN_WAVE, 5.75e3, 1000) - #src1 = gr.sig_source_c (input_rate, gr.GR_CONST_WAVE, 5.75e3, 1000) + self.src1 = analog.sig_source_c(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000) + #src1 = analog.sig_source_c(input_rate, analog.GR_CONST_WAVE, 5.75e3, 1000) # We add these throttle blocks so that this demo doesn't # suck down all the CPU available. Normally you wouldn't use these. self.thr1 = gr.throttle(gr.sizeof_gr_complex, input_rate) - sink1 = waterfall_sink_c (panel, title="Complex Data", fft_size=fft_size, - sample_rate=input_rate, baseband_freq=100e3) + sink1 = waterfall_sink_c(panel, title="Complex Data", fft_size=fft_size, + sample_rate=input_rate, baseband_freq=100e3) self.connect(self.src1, self.thr1, sink1) - vbox.Add (sink1.win, 1, wx.EXPAND) + vbox.Add(sink1.win, 1, wx.EXPAND) # generate a real sinusoid - self.src2 = gr.sig_source_f (input_rate, gr.GR_SIN_WAVE, 5.75e3, 1000) + self.src2 = analog.sig_source_f(input_rate, analog.GR_SIN_WAVE, 5.75e3, 1000) self.thr2 = gr.throttle(gr.sizeof_float, input_rate) - sink2 = waterfall_sink_f (panel, title="Real Data", fft_size=fft_size, - sample_rate=input_rate, baseband_freq=100e3) + sink2 = waterfall_sink_f(panel, title="Real Data", fft_size=fft_size, + sample_rate=input_rate, baseband_freq=100e3) self.connect(self.src2, self.thr2, sink2) - vbox.Add (sink2.win, 1, wx.EXPAND) + vbox.Add(sink2.win, 1, wx.EXPAND) def main (): - app = stdgui2.stdapp (test_top_block, "Waterfall Sink Test App") - app.MainLoop () + app = stdgui2.stdapp(test_top_block, "Waterfall Sink Test App") + app.MainLoop() if __name__ == '__main__': main () |