diff options
Diffstat (limited to 'gr-wxgui/grc')
-rw-r--r-- | gr-wxgui/grc/top_block_gui.py | 8 | ||||
-rw-r--r-- | gr-wxgui/grc/wxgui_fftsink2.xml | 12 | ||||
-rw-r--r-- | gr-wxgui/grc/wxgui_waterfallsink2.xml | 12 |
3 files changed, 30 insertions, 2 deletions
diff --git a/gr-wxgui/grc/top_block_gui.py b/gr-wxgui/grc/top_block_gui.py index 333ccf1c1..479f55a30 100644 --- a/gr-wxgui/grc/top_block_gui.py +++ b/gr-wxgui/grc/top_block_gui.py @@ -48,7 +48,7 @@ class top_block_gui(gr.top_block): def SetIcon(self, *args, **kwargs): self._frame.SetIcon(*args, **kwargs) - def Run(self, start=True): + def Run(self, start=True, max_nouts=0): """ Setup the wx gui elements. Start the gr top block. @@ -69,6 +69,10 @@ class top_block_gui(gr.top_block): self._frame.Show(True) self._app.SetTopWindow(self._frame) #start flow graph - if start: self.start() + if start: + if max_nouts != 0: + self.start(max_nouts) + else: + self.start() #blocking main loop self._app.MainLoop() diff --git a/gr-wxgui/grc/wxgui_fftsink2.xml b/gr-wxgui/grc/wxgui_fftsink2.xml index ec5501838..74ee5b173 100644 --- a/gr-wxgui/grc/wxgui_fftsink2.xml +++ b/gr-wxgui/grc/wxgui_fftsink2.xml @@ -36,6 +36,12 @@ fftsink2.$(type.fcn)( $(parent).Add(self.$(id).win) #else $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if +#if $freqvar() is not None +def $(id)_callback(x, y): + self.set_$(freqvar)(x) + +self.$(id).set_callback($(id)_callback) #end if</make> <callback>set_baseband_freq($baseband_freq)</callback> <callback>set_sample_rate($samp_rate)</callback> @@ -216,6 +222,12 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) <value></value> <type>notebook</type> </param> + <param> + <name>Freq Set Varname</name> + <key>freqvar</key> + <value>None</value> + <type>raw</type> + </param> <check>not $win_size or len($win_size) == 2</check> <sink> <name>in</name> diff --git a/gr-wxgui/grc/wxgui_waterfallsink2.xml b/gr-wxgui/grc/wxgui_waterfallsink2.xml index da6a8a3d1..8921e87f9 100644 --- a/gr-wxgui/grc/wxgui_waterfallsink2.xml +++ b/gr-wxgui/grc/wxgui_waterfallsink2.xml @@ -34,6 +34,12 @@ waterfallsink2.$(type.fcn)( $(parent).Add(self.$(id).win) #else $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) +#end if +#if $freqvar() is not None +def $(id)_callback(x, y): + self.set_$(freqvar)(x) + +self.$(id).set_callback($(id)_callback) #end if</make> <callback>set_baseband_freq($baseband_freq)</callback> <callback>set_sample_rate($samp_rate)</callback> @@ -173,6 +179,12 @@ $(parent).GridAdd(self.$(id).win, $(', '.join(map(str, $grid_pos())))) <value></value> <type>notebook</type> </param> + <param> + <name>Freq Set Varname</name> + <key>freqvar</key> + <value>None</value> + <type>raw</type> + </param> <check>not $win_size or len($win_size) == 2</check> <sink> <name>in</name> |