diff options
author | jblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-05-06 20:58:28 +0000 |
---|---|---|
committer | jblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5> | 2009-05-06 20:58:28 +0000 |
commit | 88164b0cde4b740654f72b088e44eb9158f8ff48 (patch) | |
tree | cd4a59d51bd28b7ecf0d391085fa67409e5b7f67 /gr-wxgui | |
parent | 79c75e2cadd885afd0b34f30a6926ad908e1d896 (diff) |
numbersink fix for when average=True on init
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10979 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-wxgui')
-rw-r--r-- | gr-wxgui/src/python/numbersink2.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gr-wxgui/src/python/numbersink2.py b/gr-wxgui/src/python/numbersink2.py index 5fa9e3aefe..4a182bd04b 100644 --- a/gr-wxgui/src/python/numbersink2.py +++ b/gr-wxgui/src/python/numbersink2.py @@ -87,13 +87,14 @@ class _number_sink_base(gr.hier_block2): self.controller = pubsub() self.controller.subscribe(SAMPLE_RATE_KEY, sd.set_sample_rate) self.controller.publish(SAMPLE_RATE_KEY, sd.sample_rate) + self.controller[AVERAGE_KEY] = average + self.controller[AVG_ALPHA_KEY] = avg_alpha def update_avg(*args): if self.controller[AVERAGE_KEY]: avg.set_taps(self.controller[AVG_ALPHA_KEY]) else: avg.set_taps(1.0) + update_avg() self.controller.subscribe(AVERAGE_KEY, update_avg) self.controller.subscribe(AVG_ALPHA_KEY, update_avg) - self.controller[AVERAGE_KEY] = average - self.controller[AVG_ALPHA_KEY] = avg_alpha #start input watcher common.input_watcher(msgq, self.controller, MSG_KEY) #create window |