3 # Copyright 2004 Free Software Foundation, Inc.
5 # This file is part of GNU Radio
7 # GNU Radio is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2, or (at your option)
12 # GNU Radio is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Radio; see the file COPYING. If not, write to
19 # the Free Software Foundation, Inc., 51 Franklin Street,
20 # Boston, MA 02110-1301, USA.
23 from gnuradio import gr
24 from gnuradio import mc4020
25 from gnuradio.eng_option import eng_option
26 from gnuradio.wxgui import stdgui, fftsink
27 from optparse import OptionParser
30 class app_flow_graph (stdgui.gui_flow_graph):
31 def __init__(self, frame, panel, vbox, argv):
32 stdgui.gui_flow_graph.__init__ (self, frame, panel, vbox, argv)
35 parser = OptionParser (option_class=eng_option)
36 (options, args) = parser.parse_args ()
39 src = mc4020.source (input_rate, mc4020.MCC_CH3_EN | mc4020.MCC_ALL_1V)
40 cvt = gr.short_to_float ()
41 block, fft_win = fftsink.make_fft_sink_f (self, panel, "Rx Data", 512, input_rate)
43 self.connect (src, cvt)
44 self.connect (cvt, block)
45 vbox.Add (fft_win, 1, wx.EXPAND)
49 app = stdgui.stdapp (app_flow_graph, "USRP FFT")
52 if __name__ == '__main__':