summaryrefslogtreecommitdiff
path: root/gr-wxgui
diff options
context:
space:
mode:
authorJosh Blum2009-10-28 16:17:24 -0700
committerJosh Blum2009-10-28 16:17:24 -0700
commit230e062e51d43f389520207cf147838c666a1f21 (patch)
treea8808807a56be99bdb9f926370c807725169e63d /gr-wxgui
parent0f688d959441909ec0c1c89ae279d670b2e3f6b2 (diff)
downloadgnuradio-230e062e51d43f389520207cf147838c666a1f21.tar.gz
gnuradio-230e062e51d43f389520207cf147838c666a1f21.tar.bz2
gnuradio-230e062e51d43f389520207cf147838c666a1f21.zip
Added window option to wxgui fft and waterfall sink.
Added rectangular window function to window.py. Average stays hidden in waterfall, fft, and numbersink wrappers (only avg_alpha shows/hides). Fixed options in waterfall wrapper to model after fft and numbersink average params.
Diffstat (limited to 'gr-wxgui')
-rw-r--r--gr-wxgui/src/python/fftsink_gl.py3
-rw-r--r--gr-wxgui/src/python/fftsink_nongl.py4
-rw-r--r--gr-wxgui/src/python/waterfallsink_gl.py2
3 files changed, 7 insertions, 2 deletions
diff --git a/gr-wxgui/src/python/fftsink_gl.py b/gr-wxgui/src/python/fftsink_gl.py
index 9d683d697..9b2f9a487 100644
--- a/gr-wxgui/src/python/fftsink_gl.py
+++ b/gr-wxgui/src/python/fftsink_gl.py
@@ -52,6 +52,8 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
title='',
size=fft_window.DEFAULT_WIN_SIZE,
peak_hold=False,
+ win=None,
+ **kwargs #do not end with a comma
):
#ensure avg alpha
if avg_alpha is None: avg_alpha = 2.0/fft_rate
@@ -70,6 +72,7 @@ class _fft_sink_base(gr.hier_block2, common.wxgui_hb):
ref_scale=ref_scale,
avg_alpha=avg_alpha,
average=average,
+ win=win,
)
msgq = gr.msg_queue(2)
sink = gr.message_sink(gr.sizeof_float*fft_size, msgq, True)
diff --git a/gr-wxgui/src/python/fftsink_nongl.py b/gr-wxgui/src/python/fftsink_nongl.py
index ca5e91fdb..b3a48a716 100644
--- a/gr-wxgui/src/python/fftsink_nongl.py
+++ b/gr-wxgui/src/python/fftsink_nongl.py
@@ -93,7 +93,7 @@ class fft_sink_f(gr.hier_block2, fft_sink_base):
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False):
+ title='', size=default_fftsink_size, peak_hold=False, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_f",
gr.io_signature(1, 1, gr.sizeof_float),
@@ -136,7 +136,7 @@ class fft_sink_c(gr.hier_block2, fft_sink_base):
def __init__(self, parent, baseband_freq=0, ref_scale=2.0,
y_per_div=10, y_divs=8, ref_level=50, sample_rate=1, fft_size=512,
fft_rate=default_fft_rate, average=False, avg_alpha=None,
- title='', size=default_fftsink_size, peak_hold=False):
+ title='', size=default_fftsink_size, peak_hold=False, **kwargs):
gr.hier_block2.__init__(self, "fft_sink_c",
gr.io_signature(1, 1, gr.sizeof_gr_complex),
diff --git a/gr-wxgui/src/python/waterfallsink_gl.py b/gr-wxgui/src/python/waterfallsink_gl.py
index 37844399e..c6b0df65c 100644
--- a/gr-wxgui/src/python/waterfallsink_gl.py
+++ b/gr-wxgui/src/python/waterfallsink_gl.py
@@ -51,6 +51,7 @@ class _waterfall_sink_base(gr.hier_block2, common.wxgui_hb):
ref_scale=2.0,
dynamic_range=80,
num_lines=256,
+ win=None,
**kwargs #do not end with a comma
):
#ensure avg alpha
@@ -70,6 +71,7 @@ class _waterfall_sink_base(gr.hier_block2, common.wxgui_hb):
ref_scale=ref_scale,
avg_alpha=avg_alpha,
average=average,
+ win=win,
)
msgq = gr.msg_queue(2)
sink = gr.message_sink(gr.sizeof_float*fft_size, msgq, True)