summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python/common.py
diff options
context:
space:
mode:
authorMarcus D Leech2010-05-16 08:44:16 -0700
committerJohnathan Corgan2010-05-16 08:44:16 -0700
commitdc79a11cb809b33f397603e7641b155120be9ee8 (patch)
tree234526eef100782370d750c8a4d7b0dd50ca4760 /gr-wxgui/src/python/common.py
parent467678259c56fab32a326690cc01eac1dbcb48ca (diff)
downloadgnuradio-dc79a11cb809b33f397603e7641b155120be9ee8.tar.gz
gnuradio-dc79a11cb809b33f397603e7641b155120be9ee8.tar.bz2
gnuradio-dc79a11cb809b33f397603e7641b155120be9ee8.zip
gr-wxgui: adds stripchart trigger mode to graphics sinks
Diffstat (limited to 'gr-wxgui/src/python/common.py')
-rw-r--r--gr-wxgui/src/python/common.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/gr-wxgui/src/python/common.py b/gr-wxgui/src/python/common.py
index 17a7dc0de..3641ae644 100644
--- a/gr-wxgui/src/python/common.py
+++ b/gr-wxgui/src/python/common.py
@@ -25,6 +25,8 @@
import wx
from gnuradio import gr
+RUN_ALWAYS = gr.prefs().get_bool ('wxgui', 'run_always', False)
+
class wxgui_hb(object):
"""
The wxgui hier block helper/wrapper class:
@@ -47,7 +49,10 @@ class wxgui_hb(object):
assert points[0] == self or points[0][0] == self
copy = gr.copy(self._hb.input_signature().sizeof_stream_item(0))
handler = self._handler_factory(copy.set_enabled)
- handler(False) #initially disable the copy block
+ if RUN_ALWAYS == False:
+ handler(False) #initially disable the copy block
+ else:
+ handler(True) #initially enable the copy block
self._bind_to_visible_event(win=self.win, handler=handler)
points = list(points)
points.insert(1, copy) #insert the copy block into the chain
@@ -67,7 +72,10 @@ class wxgui_hb(object):
if cache[0] == visible: return
cache[0] = visible
#print visible, handler
- handler(visible)
+ if RUN_ALWAYS == False:
+ handler(visible)
+ else:
+ handler(True)
return callback
@staticmethod