From: jblum Date: Fri, 1 May 2009 20:28:04 +0000 (+0000) Subject: Merged grc developer branch r10679:10938 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=a3ba8cf268816af51c4bb39ea7ecd7e85ea0807b;p=debian%2Fgnuradio Merged grc developer branch r10679:10938 Misc fixes and internal changes. Added help menu for usage tips. Added drag and drop for blocks. Removed callback controls, adopted forms. Any type can have enumerated options. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10941 221aa14e-8319-0410-a670-987f0aec2ac5 --- diff --git a/config/grc_grc.m4 b/config/grc_grc.m4 index 07463a52..d8bc02a2 100644 --- a/config/grc_grc.m4 +++ b/config/grc_grc.m4 @@ -60,11 +60,6 @@ AC_DEFUN([GRC_GRC],[ grc/src/utils/Makefile \ grc/src/gui/Makefile \ grc/examples/Makefile \ - grc/examples/xmlrpc/Makefile \ - grc/examples/usrp/Makefile \ - grc/examples/audio/Makefile \ - grc/examples/simple/Makefile \ - grc/examples/trellis/Makefile \ grc/Makefile \ grc/data/Makefile \ grc/data/platforms/Makefile \ diff --git a/grc/Makefile.inc b/grc/Makefile.inc index 8acd4e10..4d78070d 100644 --- a/grc/Makefile.inc +++ b/grc/Makefile.inc @@ -23,7 +23,6 @@ include $(top_srcdir)/Makefile.common grc_gnuradio_prefix = $(pythondir)/grc_gnuradio grc_src_prefix = $(pythondir)/gnuradio/grc grc_data_prefix = $(datadir)/$(PACKAGE)/grc -grc_examples_prefix = $(exampledir)/grc grc_base_data_dir = $(grc_data_prefix)/platforms/base grc_python_data_dir = $(grc_data_prefix)/platforms/python grc_python_blocks_dir = $(grc_data_prefix)/platforms/python/blocks diff --git a/grc/data/platforms/python/blocks/audio_sink.xml b/grc/data/platforms/python/blocks/audio_sink.xml index decaf2a0..75d58347 100644 --- a/grc/data/platforms/python/blocks/audio_sink.xml +++ b/grc/data/platforms/python/blocks/audio_sink.xml @@ -13,7 +13,7 @@ Sample Rate samp_rate 32000 - enum + int + + Vec Length + vlen + 1 + int + + $vlen > 0 out $type + $vlen diff --git a/grc/data/platforms/python/blocks/options.xml b/grc/data/platforms/python/blocks/options.xml index 11e46bbe..07f659af 100644 --- a/grc/data/platforms/python/blocks/options.xml +++ b/grc/data/platforms/python/blocks/options.xml @@ -10,10 +10,14 @@ Options options from gnuradio import gr -#if $generate_options.eval == 'wx_gui' +#if $generate_options() == 'wx_gui' from grc_gnuradio import wxgui as grc_wxgui import wx #end if +#if $generate_options() != 'hb' +from optparse import OptionParser +from gnuradio.eng_option import eng_option +#end if @@ -64,16 +68,16 @@ import wx category Custom string - #if $generate_options.eval == 'hb' then 'none' else 'all'# + #if $generate_options() == 'hb' then 'none' else 'all'# Realtime Scheduling realtime_scheduling enum - #if $generate_options.eval == 'hb' + #if $generate_options() == 'hb' all#slurp -#elif $realtime_scheduling.eval +#elif $realtime_scheduling() none#slurp #else part#slurp diff --git a/grc/data/platforms/python/blocks/parameter.xml b/grc/data/platforms/python/blocks/parameter.xml index de208501..e7bf6156 100644 --- a/grc/data/platforms/python/blocks/parameter.xml +++ b/grc/data/platforms/python/blocks/parameter.xml @@ -7,13 +7,13 @@ Parameter parameter - from optparse import OptionParser $value Label label string + #if $label() then 'none' else 'part'# Value @@ -41,7 +41,7 @@ @@ -65,12 +65,14 @@ -This block represents a parameter to the flow graph, \ -used when the flow graph is instantiated as a hier block. +This block represents a parameter to the flow graph. \ +A parameter can be used to pass command line arguments into a top block. \ +Or, parameters can pass arguments into an instantiated hierarchical block. The paramater value cannot depend on any variables. -Leave the label blank to use the parameter id as the label. +Leave the label blank to use the parameter id as the label. \ +The label only applies when this flow graph is instantiated as a hierarchical block. When type is not None, this parameter also becomes a command line option of the form --[id] [value]. diff --git a/grc/data/platforms/python/blocks/probe_function.xml b/grc/data/platforms/python/blocks/probe_function.xml index d4687852..ac0b3dcd 100644 --- a/grc/data/platforms/python/blocks/probe_function.xml +++ b/grc/data/platforms/python/blocks/probe_function.xml @@ -9,7 +9,7 @@ probe_function from grc_gnuradio import blks2 as grc_blks2 grc_blks2.probe_function( - probe_callback=self.$(block_id.eval).$(function_name.eval), + probe_callback=self.$(block_id()).$(function_name()), probe_rate=$probe_rate, ) set_probe_rate($probe_rate) diff --git a/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml index e6e31578..264ed4f2 100644 --- a/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml +++ b/grc/data/platforms/python/blocks/usrp2_sink_xxxx.xml @@ -8,9 +8,9 @@ USRP2 Sink usrp2_sink_xxxx from gnuradio import usrp2 - #if not $interface.eval and not $mac_addr.eval + #if not $interface() and not $mac_addr() usrp2.sink_$(type.fcn)() -#elif not $mac_addr.eval +#elif not $mac_addr() usrp2.sink_$(type.fcn)($interface) #else usrp2.sink_$(type.fcn)($interface, $mac_addr) diff --git a/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml b/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml index 8b8ae324..54bea7a4 100644 --- a/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml +++ b/grc/data/platforms/python/blocks/usrp2_source_xxxx.xml @@ -8,9 +8,9 @@ USRP2 Source usrp2_source_xxxx from gnuradio import usrp2 - #if not $interface.eval and not $mac_addr.eval + #if not $interface() and not $mac_addr() usrp2.source_$(type.fcn)() -#elif not $mac_addr.eval +#elif not $mac_addr() usrp2.source_$(type.fcn)($interface) #else usrp2.source_$(type.fcn)($interface, $mac_addr) diff --git a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml index 823850b5..cb75fcea 100644 --- a/grc/data/platforms/python/blocks/usrp_dual_source_x.xml +++ b/grc/data/platforms/python/blocks/usrp_dual_source_x.xml @@ -8,8 +8,8 @@ USRP Dual Source usrp_dual_source_x from grc_gnuradio import usrp as grc_usrp - grc_usrp.dual_source_$(type.fcn)(which=$which, rx_ant_a='$rx_ant_a', rx_ant_b='$rx_ant_b') -#if $format.eval + grc_usrp.dual_source_$(type.fcn)(which=$which, rx_ant_a=$rx_ant_a, rx_ant_b=$rx_ant_b) +#if $format() self.$(id).set_format(width=$format.width, shift=$format.shift) #end if self.$(id).set_decim_rate($decimation) @@ -42,7 +42,7 @@ self.$(id).set_gain_b($gain_b) format enum - #if $format.eval then '' else 'part'# + #if $format() then '' else 'part'# RX Antenna A rx_ant_a - enum + RXA + string RX Antenna B rx_ant_b - enum + RXA + string