257 current_location = ".".join(map(str, self.GetCurrentLocation())) |
257 current_location = ".".join(map(str, self.GetCurrentLocation())) |
258 if not generator.ComputedBlocks.get(block, False) and not order: |
258 if not generator.ComputedBlocks.get(block, False) and not order: |
259 generator.ComputedBlocks[block] = True |
259 generator.ComputedBlocks[block] = True |
260 for num, variable in enumerate(block.inputVariables.getvariable()): |
260 for num, variable in enumerate(block.inputVariables.getvariable()): |
261 connections = variable.connectionPointIn.getconnections() |
261 connections = variable.connectionPointIn.getconnections() |
262 input_info = (generator.TagName, "block", block.getlocalId(), "input", num) |
262 if connections is not None: |
263 if connections and len(connections) == 1: |
263 input_info = (generator.TagName, "block", block.getlocalId(), "input", num) |
264 parameter = "%sQ%s%s.%d.%d"%("%", TYPECONVERSION[block_infos["inputs"][num][1]], current_location, block_id, num+1) |
264 parameter = "%sQ%s%s.%d.%d"%("%", TYPECONVERSION[block_infos["inputs"][num][1]], current_location, block_id, num+1) |
265 value = generator.ComputeFBDExpression(body, connections[0]) |
265 value = generator.ComputeExpression(body, connections) |
266 generator.Program += [(generator.CurrentIndent, ()), |
266 generator.Program += [(generator.CurrentIndent, ()), |
267 (parameter, input_info), |
267 (parameter, input_info), |
268 (" := ", ())] |
268 (" := ", ())] |
269 generator.Program += generator.ExtractModifier(variable, value, input_info) |
269 generator.Program += generator.ExtractModifier(variable, value, input_info) |
270 generator.Program += [(";\n", ())] |
270 generator.Program += [(";\n", ())] |