diff options
author | Marcus Leech | 2010-10-17 17:20:04 -0400 |
---|---|---|
committer | Tom Rondeau | 2010-10-17 17:20:04 -0400 |
commit | dd74b98a42f5e79c4d464cfa745b3f8af51e486e (patch) | |
tree | 0a6639212e1e9ac8f06e0745503310a8ca0bbe48 /gr-wxgui/src | |
parent | b03f921273423dddc5c8b76d6ab0cfcfe80123a3 (diff) | |
download | gnuradio-dd74b98a42f5e79c4d464cfa745b3f8af51e486e.tar.gz gnuradio-dd74b98a42f5e79c4d464cfa745b3f8af51e486e.tar.bz2 gnuradio-dd74b98a42f5e79c4d464cfa745b3f8af51e486e.zip |
Adds a new parameter "y_axis_label" to scopesink2 and the GRC .xml file that contains the string for the Y axis label. It defaults to 'Counts' to be consistent with the old version.
Diffstat (limited to 'gr-wxgui/src')
-rw-r--r-- | gr-wxgui/src/python/constants.py | 1 | ||||
-rw-r--r-- | gr-wxgui/src/python/scope_window.py | 4 | ||||
-rw-r--r-- | gr-wxgui/src/python/scopesink_gl.py | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/gr-wxgui/src/python/constants.py b/gr-wxgui/src/python/constants.py index 9612f36dd..070be0808 100644 --- a/gr-wxgui/src/python/constants.py +++ b/gr-wxgui/src/python/constants.py @@ -66,6 +66,7 @@ X_PER_DIV_KEY = 'x_per_div' Y_DIVS_KEY = 'y_divs' Y_OFF_KEY = 'y_off' Y_PER_DIV_KEY = 'y_per_div' +Y_AXIS_LABEL = 'y_axis_label' MAXIMUM_KEY = 'maximum' MINIMUM_KEY = 'minimum' NUM_BINS_KEY = 'num_bins' diff --git a/gr-wxgui/src/python/scope_window.py b/gr-wxgui/src/python/scope_window.py index a9917782f..89a808cec 100644 --- a/gr-wxgui/src/python/scope_window.py +++ b/gr-wxgui/src/python/scope_window.py @@ -435,6 +435,7 @@ class scope_window(wx.Panel, pubsub.pubsub): use_persistence, persist_alpha, trig_mode, + y_axis_label, ): pubsub.pubsub.__init__(self) #check num inputs @@ -471,6 +472,7 @@ class scope_window(wx.Panel, pubsub.pubsub): self[T_DIVS_KEY] = 8 self[X_DIVS_KEY] = 8 self[Y_DIVS_KEY] = 8 + self[Y_AXIS_LABEL] = y_axis_label self[FRAME_RATE_KEY] = frame_rate self[TRIGGER_LEVEL_KEY] = 0 self[TRIGGER_CHANNEL_KEY] = 0 @@ -676,7 +678,7 @@ class scope_window(wx.Panel, pubsub.pubsub): self.plotter.set_x_label('Time', 's') self.plotter.set_x_grid(self.get_t_min(), self.get_t_max(), self[T_PER_DIV_KEY], True) #update the y axis - self.plotter.set_y_label('Counts') + self.plotter.set_y_label(self[Y_AXIS_LABEL]) self.plotter.set_y_grid(self.get_y_min(), self.get_y_max(), self[Y_PER_DIV_KEY]) #redraw current sample self.handle_samples() diff --git a/gr-wxgui/src/python/scopesink_gl.py b/gr-wxgui/src/python/scopesink_gl.py index 15be23d5a..5ae897400 100644 --- a/gr-wxgui/src/python/scopesink_gl.py +++ b/gr-wxgui/src/python/scopesink_gl.py @@ -77,6 +77,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): ac_couple=False, num_inputs=1, trig_mode=scope_window.DEFAULT_TRIG_MODE, + y_axis_label='Counts', frame_rate=scope_window.DEFAULT_FRAME_RATE, use_persistence=False, persist_alpha=None, @@ -134,6 +135,7 @@ class _scope_sink_base(gr.hier_block2, common.wxgui_hb): v_offset=v_offset, xy_mode=xy_mode, trig_mode=trig_mode, + y_axis_label=y_axis_label, ac_couple_key=AC_COUPLE_KEY, trigger_level_key=TRIGGER_LEVEL_KEY, trigger_mode_key=TRIGGER_MODE_KEY, |