summaryrefslogtreecommitdiff
path: root/grc/python/flow_graph.tmpl
diff options
context:
space:
mode:
authorJose Quaresma2012-05-03 12:50:39 -0400
committerTom Rondeau2012-05-03 12:50:39 -0400
commitf4da804ea3dde5e376e520769a93f80545670208 (patch)
tree489751663f088de914906e925c4d4937f3617758 /grc/python/flow_graph.tmpl
parent05b2c02f17d790df4896fcfb85c4020748f25747 (diff)
downloadgnuradio-f4da804ea3dde5e376e520769a93f80545670208.tar.gz
gnuradio-f4da804ea3dde5e376e520769a93f80545670208.tar.bz2
gnuradio-f4da804ea3dde5e376e520769a93f80545670208.zip
GRC: patch to allow users to specify max_noutput_items in GRC options block.
Diffstat (limited to 'grc/python/flow_graph.tmpl')
-rw-r--r--grc/python/flow_graph.tmpl16
1 files changed, 16 insertions, 0 deletions
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 0878be4ba..17feb01f6 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -244,12 +244,20 @@ if __name__ == '__main__':
#end if
#if $generate_options == 'wx_gui'
tb = $(class_name)($(', '.join($params_eq_list)))
+ #if $flow_graph.get_option('max_nouts')
+ tb.Run($flow_graph.get_option('run'), $flow_graph.get_option('max_nouts'))
+ #else
tb.Run($flow_graph.get_option('run'))
+ #end if
#elif $generate_options == 'qt_gui'
qapp = Qt.QApplication(sys.argv)
tb = $(class_name)($(', '.join($params_eq_list)))
#if $flow_graph.get_option('run')
+ #if $flow_graph.get_option('max_nouts')
+ tb.start($flow_graph.get_option('max_nouts'))
+ #else
tb.start()
+ #end if
#end if
tb.show()
qapp.exec_()
@@ -258,11 +266,19 @@ if __name__ == '__main__':
tb = $(class_name)($(', '.join($params_eq_list)))
#set $run_options = $flow_graph.get_option('run_options')
#if $run_options == 'prompt'
+ #if $flow_graph.get_option('max_nouts')
+ tb.start($flow_graph.get_option('max_nouts'))
+ #else
tb.start()
+ #end if
raw_input('Press Enter to quit: ')
tb.stop()
#elif $run_options == 'run'
+ #if $flow_graph.get_option('max_nouts')
+ tb.run($flow_graph.get_option('max_nouts'))
+ #else
tb.run()
+ #end if
#end if
#end if
#end if