[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9197 - in grc/trunk/src/grc_gnuradio: . data
From: |
jblum |
Subject: |
[Commit-gnuradio] r9197 - in grc/trunk/src/grc_gnuradio: . data |
Date: |
Wed, 6 Aug 2008 16:11:43 -0600 (MDT) |
Author: jblum
Date: 2008-08-06 16:11:43 -0600 (Wed, 06 Aug 2008)
New Revision: 9197
Modified:
grc/trunk/src/grc_gnuradio/FlowGraph.py
grc/trunk/src/grc_gnuradio/data/flow_graph.tmpl
Log:
var dep fix
Modified: grc/trunk/src/grc_gnuradio/FlowGraph.py
===================================================================
--- grc/trunk/src/grc_gnuradio/FlowGraph.py 2008-08-06 21:33:22 UTC (rev
9196)
+++ grc/trunk/src/grc_gnuradio/FlowGraph.py 2008-08-06 22:11:43 UTC (rev
9197)
@@ -87,7 +87,10 @@
#map var id to variable block
id2var = dict([(var.get_id(), var) for var in variables])
#map var id to variable code
- id2expr = dict([(var.get_id(), var.get_make().split('\n')[0])
for var in variables])
+ #variable code is a concatenation of all param code (without
the id param)
+ id2expr = dict([(var.get_id(),
+ ' '.join([param.to_code() for param in filter(lambda p:
p.get_key() != 'id',var.get_params())])
+ ) for var in variables])
#sort according to dependency
sorted_ids = expr_utils.sort_variables(id2expr)
#create list of sorted variable blocks
Modified: grc/trunk/src/grc_gnuradio/data/flow_graph.tmpl
===================================================================
--- grc/trunk/src/grc_gnuradio/data/flow_graph.tmpl 2008-08-06 21:33:22 UTC
(rev 9196)
+++ grc/trunk/src/grc_gnuradio/data/flow_graph.tmpl 2008-08-06 22:11:43 UTC
(rev 9197)
@@ -74,12 +74,12 @@
gr.io_signature($out_sig.nports, $out_sig.nports,
$out_sig.size*$out_sig.vlen),
)
#end if
-
########################################################
##Create Parameters
## Set the parameter to a property of self..
########################################################
#if $parameters
+
$DIVIDER
# Parameters
$DIVIDER
@@ -87,13 +87,13 @@
#for $param in $parameters
self.$param.get_id() = $param.get_id()
#end for
-
########################################################
##Create Variables
## Set the variable to a property of self.
## Write the variable make, and indent with 2 tabs.
########################################################
#if $variables
+
$DIVIDER
# Variables
$DIVIDER
@@ -103,12 +103,12 @@
$var.get_id() = $code
self.$var.get_id() = $var.get_id()
#end for
-
########################################################
##Create Blocks
## Write the block make, and indent with 2 tabs.
########################################################
#if $blocks
+
$DIVIDER
# Blocks
$DIVIDER
@@ -117,13 +117,13 @@
#set $code = '\n\t\t'.join($blk.get_make().splitlines())
$("self.%s = %s"%($blk.get_id(), $code))
#end for
-
########################################################
##Create Connections
## The port name should be the id of the parent block.
## However, port names for IO pads should be self.
########################################################
#if $connections
+
$DIVIDER
# Connections
$DIVIDER
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9197 - in grc/trunk/src/grc_gnuradio: . data,
jblum <=