diff options
author | Marcus Leech <mleech@ripnet.com> | 2012-05-21 14:35:33 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-05-21 14:35:33 -0400 |
commit | ed838eb9be22d769247a9c63f23423c8c2f81f72 (patch) | |
tree | e109cbd8d7ce5ea2ae3df2f6ce64256ad17aeecb /gr-wxgui/grc | |
parent | d4fe4377e72165d88fdf00f6c8d5a5b986b25955 (diff) |
wxgui: allows LEFT click to set a flow-graph variable to the adjusted X value on either the FFT or waterfall display.
Diffstat (limited to 'gr-wxgui/grc')
-rw-r--r-- | gr-wxgui/grc/wxgui_fftsink2.xml | 12 | ||||
-rw-r--r-- | gr-wxgui/grc/wxgui_waterfallsink2.xml | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gr-wxgui/grc/wxgui_fftsink2.xml b/gr-wxgui/grc/wxgui_fftsink2.xml index ec5501838a..74ee5b173e 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 da6a8a3d1a..8921e87f9a 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> |