[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r8842 - gnuradio/branches/features/experimental-gui
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r8842 - gnuradio/branches/features/experimental-gui |
Date: |
Wed, 9 Jul 2008 12:10:27 -0600 (MDT) |
Author: jcorgan
Date: 2008-07-09 12:10:25 -0600 (Wed, 09 Jul 2008)
New Revision: 8842
Added:
gnuradio/branches/features/experimental-gui/fft_gui.py
Modified:
gnuradio/branches/features/experimental-gui/usrp_fft.py
gnuradio/branches/features/experimental-gui/wxgui_app.py
Log:
wip on fft_gui
Added: gnuradio/branches/features/experimental-gui/fft_gui.py
===================================================================
--- gnuradio/branches/features/experimental-gui/fft_gui.py
(rev 0)
+++ gnuradio/branches/features/experimental-gui/fft_gui.py 2008-07-09
18:10:25 UTC (rev 8842)
@@ -0,0 +1,54 @@
+#
+# Copyright 2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#
+
+# This requires GRC installed (temporary for demo purposes)
+from wxgui_app import wxgui_app
+from fft_window import fft_window
+
+"""!
+Top level graphical user interface for usrp_fft application. Right now
+just has the FFT window created; but will eventually have all the
+controls as well.
+"""
+
+class fft_gui(wxgui_app):
+ def __init__(self, controller):
+ wxgui_app.__init__(self, controller=controller, title='fft demo')
+
+ self._win = fft_window(parent=self.GetWin(),
+ controller=controller,
+ size=(600, 300),
+ title='fft window',
+ real=False,
+ baseband_freq=0.0,
+ sample_rate_key='sample_rate',
+ y_per_div=10,
+ y_divs=10,
+ ref_level=0,
+ average_key='average',
+ avg_alpha_key='avg_alpha',
+ peak_hold=True,
+ msg_key='fft')
+
+ self.Add(self._win)
+
+ def run(self):
+ self.Run()
Modified: gnuradio/branches/features/experimental-gui/usrp_fft.py
===================================================================
--- gnuradio/branches/features/experimental-gui/usrp_fft.py 2008-07-09
17:20:12 UTC (rev 8841)
+++ gnuradio/branches/features/experimental-gui/usrp_fft.py 2008-07-09
18:10:25 UTC (rev 8842)
@@ -28,7 +28,7 @@
from fft_controller import fft_controller
# Import the GUI object
-# from fft_gui import fft_gui
+from fft_gui import fft_gui
def get_options():
parser = OptionParser(option_class=eng_option)
@@ -91,49 +91,6 @@
# program, an interactive shell, or anything that knows what to
# do with the controller properties.
#
- # gui = fft_gui(controller)
- # gui.run()
+ gui = fft_gui(controller)
+ gui.run()
- # END
-
- from wxgui_app import wxgui_app
- from fft_window import fft_window
-
- app = wxgui_app(
- controller=controller,
- title='fft demo',
- )
-
- win = fft_window(
- parent=app.GetWin(),
- controller=controller,
- size=(600, 300),
- title='fft window',
- real=False,
- baseband_freq=0.0,
- sample_rate_key='sample_rate',
- y_per_div=10,
- y_divs=10,
- ref_level=0,
- average_key='average',
- avg_alpha_key='avg_alpha',
- peak_hold=True,
- msg_key='fft',
- )
-
- app.Add(win)
- app.Run()
-
- # Temporary until GUI is written
- #
- # This simply adds a listener that prints a line whenever the FFT
- # property is updated, and invokes the controller init and exit
- # methods.
- controller.add_listener('fft', lambda x: sys.stdout.write('FFT updated:
'+`len(x)/4`+' bins\n'))
- controller.on_init()
- try:
- raw_input("Press ENTER to stop...\n")
- except KeyboardInterrupt:
- pass
- controller.on_exit()
- # end temporary code
Modified: gnuradio/branches/features/experimental-gui/wxgui_app.py
===================================================================
--- gnuradio/branches/features/experimental-gui/wxgui_app.py 2008-07-09
17:20:12 UTC (rev 8841)
+++ gnuradio/branches/features/experimental-gui/wxgui_app.py 2008-07-09
18:10:25 UTC (rev 8842)
@@ -18,6 +18,11 @@
# Boston, MA 02110-1301, USA.
#
+"""!
+This will ultimately become the convenience parent class for wxPython
+based GNU Radio apps, like wxgui.std_app is now.
+"""
+
import wx
default_gui_size = (200, 100)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r8842 - gnuradio/branches/features/experimental-gui,
jcorgan <=