diff options
author | jblum | 2009-03-11 19:07:31 +0000 |
---|---|---|
committer | jblum | 2009-03-11 19:07:31 +0000 |
commit | ceca8e1482d9d4c93eecb279d2491186e4ad8076 (patch) | |
tree | 982f629f654ca5fd8526977e987b1599fb9693de /grc/src/platforms | |
parent | a26cbe72ae41b9505544679e4e35c91102657b02 (diff) | |
download | gnuradio-ceca8e1482d9d4c93eecb279d2491186e4ad8076.tar.gz gnuradio-ceca8e1482d9d4c93eecb279d2491186e4ad8076.tar.bz2 gnuradio-ceca8e1482d9d4c93eecb279d2491186e4ad8076.zip |
Add a warning about flow control and throttle when the fg is generated.
Because who reads the wiki anyway.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10581 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/src/platforms')
-rw-r--r-- | grc/src/platforms/python/Generator.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/grc/src/platforms/python/Generator.py b/grc/src/platforms/python/Generator.py index 5d3a13872..83dd186c3 100644 --- a/grc/src/platforms/python/Generator.py +++ b/grc/src/platforms/python/Generator.py @@ -26,6 +26,7 @@ from Constants import \ HIER_BLOCKS_LIB_DIR, PYEXEC, \ FLOW_GRAPH_TEMPLATE from utils import convert_hier +from ... gui import Messages class Generator(object): @@ -50,6 +51,12 @@ class Generator(object): def get_file_path(self): return self._file_path def write(self): + #do throttle warning + all_keys = ' '.join(map(lambda b: b.get_key(), self._flow_graph.get_enabled_blocks())) + if ('usrp' not in all_keys) and ('audio' not in all_keys) and ('throttle' not in all_keys): + Messages.send_warning('''\ +This flow graph may not have flow control: no audio or usrp blocks found. \ +Add a Misc->Throttle block to your flow graph to avoid CPU congestion.''') #generate open(self.get_file_path(), 'w').write(str(self)) if self._generate_options == 'hb': |