[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9266 - gnuradio/branches/developers/jblum/glwxgui/gr-
From: |
jblum |
Subject: |
[Commit-gnuradio] r9266 - gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python |
Date: |
Wed, 13 Aug 2008 15:11:55 -0600 (MDT) |
Author: jblum
Date: 2008-08-13 15:11:54 -0600 (Wed, 13 Aug 2008)
New Revision: 9266
Modified:
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/fft_window.py
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scope_window.py
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scopesink_gl.py
Log:
const wrapper, reset peak vals
Modified:
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/fft_window.py
===================================================================
---
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/fft_window.py
2008-08-13 19:30:37 UTC (rev 9265)
+++
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/fft_window.py
2008-08-13 21:11:54 UTC (rev 9266)
@@ -150,7 +150,7 @@
self.sample_rate_key = sample_rate_key
self.average_key = average_key
self.avg_alpha_key = avg_alpha_key
- self.peak_vals = NO_PEAK_VALS
+ self._reset_peak_vals()
#init panel and plot
wx.Panel.__init__(self, parent, -1, style=wx.SIMPLE_BORDER)
self.plotter = plotter.channel_plotter(self)
@@ -175,6 +175,7 @@
self._register_set_prop(self, RUNNING_KEY, True)
#register events
self.subscribe(PEAK_HOLD_KEY, self.plotter.enable_legend)
+ self.ext_controller.subscribe(AVERAGE_KEY, lambda x:
self._reset_peak_vals())
self.ext_controller.subscribe(msg_key, self.handle_msg)
self.ext_controller.subscribe(self.sample_rate_key,
self.update_grid)
for key in (
@@ -186,6 +187,8 @@
self.plotter.enable_legend(self[PEAK_HOLD_KEY])
self.update_grid()
+ def _reset_peak_vals(self): self.peak_vals = NO_PEAK_VALS
+
def handle_msg(self, msg):
"""!
Handle the message from the fft sink message queue.
@@ -206,7 +209,7 @@
if self[PEAK_HOLD_KEY]:
if len(self.peak_vals) != len(samples): self.peak_vals
= samples
self.peak_vals = numpy.maximum(samples, self.peak_vals)
- else: self.peak_vals = NO_PEAK_VALS
+ else: self._reset_peak_vals()
#plot the fft
self.plotter.set_waveform(
channel='FFT',
Modified:
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scope_window.py
===================================================================
---
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scope_window.py
2008-08-13 19:30:37 UTC (rev 9265)
+++
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scope_window.py
2008-08-13 21:11:54 UTC (rev 9266)
@@ -298,7 +298,7 @@
self._register_set_prop(self, X_DIVS_KEY, 8)
self._register_set_prop(self, Y_DIVS_KEY, 8)
self._register_set_prop(self, SCOPE_X_CHANNEL_KEY, 0)
- self._register_set_prop(self, SCOPE_Y_CHANNEL_KEY, 1)
+ self._register_set_prop(self, SCOPE_Y_CHANNEL_KEY, num_inputs-1)
self._register_set_prop(self, FRAME_RATE_KEY, frame_rate)
self._register_set_prop(self, TRIGGER_CHANNEL_KEY, 0)
self._register_set_prop(self, TRIGGER_MODE_KEY, 1)
Modified:
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scopesink_gl.py
===================================================================
---
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scopesink_gl.py
2008-08-13 19:30:37 UTC (rev 9265)
+++
gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python/scopesink_gl.py
2008-08-13 21:11:54 UTC (rev 9266)
@@ -123,6 +123,12 @@
_item_size = gr.sizeof_gr_complex
_real = False
+#backwards compadible wrapper (maybe only grc uses this)
+class constellation_sink(scope_sink_c):
+ def __init__(self, **kwargs):
+ kwargs['xy_mode'] = True
+ scope_sink_c.__init__(self, **kwargs)
+
# ----------------------------------------------------------------
# Stand-alone test application
# ----------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9266 - gnuradio/branches/developers/jblum/glwxgui/gr-wxgui/src/python,
jblum <=