diff options
author | Sunil Shetye | 2024-03-04 17:34:37 +0530 |
---|---|---|
committer | Sunil Shetye | 2024-03-04 17:34:37 +0530 |
commit | d334ea38016714e1eabf6856a9d74ba14730d33c (patch) | |
tree | ed66dc5ec01a1b2c63952386c9c14e2262ff2ba3 | |
parent | c7618f10cf93bfffed0a5d075031b79ff84e9a3e (diff) | |
download | Common-Interface-Project-d334ea38016714e1eabf6856a9d74ba14730d33c.tar.gz Common-Interface-Project-d334ea38016714e1eabf6856a9d74ba14730d33c.tar.bz2 Common-Interface-Project-d334ea38016714e1eabf6856a9d74ba14730d33c.zip |
code cleanup
-rwxr-xr-x | blocks/Xcos/MxGraphParser.py | 7 | ||||
-rw-r--r-- | blocks/Xcos/blocks/CSCOPE.py | 1 | ||||
-rw-r--r-- | blocks/Xcos/common/AAAAAA.py | 9 | ||||
-rw-r--r-- | blocks/Xcos/ports/CommandPort.py | 4 | ||||
-rw-r--r-- | blocks/Xcos/ports/ControlPort.py | 4 | ||||
-rw-r--r-- | blocks/Xcos/ports/ExplicitInputPort.py | 4 | ||||
-rw-r--r-- | blocks/Xcos/ports/ExplicitOutputPort.py | 4 | ||||
-rw-r--r-- | blocks/Xcos/ports/ImplicitInputPort.py | 4 | ||||
-rw-r--r-- | blocks/Xcos/ports/ImplicitOutputPort.py | 4 |
9 files changed, 2 insertions, 39 deletions
diff --git a/blocks/Xcos/MxGraphParser.py b/blocks/Xcos/MxGraphParser.py index b51c2586..7524f1c7 100755 --- a/blocks/Xcos/MxGraphParser.py +++ b/blocks/Xcos/MxGraphParser.py @@ -34,8 +34,6 @@ outdiagram = ET.Element('XcosDiagram') outdiagram.set('background', '-1') outdiagram.set('finalIntegrationTime', '30.0') # TODO: From POST outdiagram.set('title', title) -# dt = datetime.datetime(2016, 4, 6, 20, 40) -# comment = ET.Comment(dt.strftime('Xcos - 1.0 - scilab-5.5.2 - %Y%m%d %H%M')) dt = datetime.datetime(2021, 7, 15, 15, 31) comment = ET.Comment(dt.strftime('Xcos - 2.0 - scilab-6.1.1 - %Y%m%d %H%M')) outdiagram.append(comment) @@ -151,9 +149,7 @@ for root in model: sourceVertex = attrib['sourceVertex'] targetVertex = attrib['targetVertex'] sourceType = IDLIST[sourceVertex] - # print(IDLIST) targetType = IDLIST[targetVertex] - # targetType = IDLIST.get(targetVertex, None) # switch vertices if required @@ -185,7 +181,6 @@ for root in model: print(attribid, 'Unknown combination of', sourceType, 'and', targetType) continue - # print(attribid,style) if style is not None: edgeDict[attribid] = (style, sourceVertex, targetVertex, sourceType, targetType) edgeDict2[attribid] = (style, sourceVertex, targetVertex, sourceType, targetType) @@ -238,7 +233,6 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, geometry) in nextattribid += 1 linkid = nextAttribForSplit nextAttribForSplit += 1 - # (style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2[sourceVertex] (style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2.get(sourceVertex, (None, None, None, None, None)) elif sourceType == 'ControlPort': geometry = {} @@ -270,7 +264,6 @@ for (attribid, sourceVertex, targetVertex, sourceType, targetType, geometry) in nextattribid += 1 linkid = nextAttribForSplit nextAttribForSplit += 1 - # (style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2[targetVertex] (style2, sourceVertex2, targetVertex2, sourceType2, targetType2) = edgeDict2.get(targetVertex, (None, None, None, None, None)) geometry = {} geometry['width'] = 8 diff --git a/blocks/Xcos/blocks/CSCOPE.py b/blocks/Xcos/blocks/CSCOPE.py index 146efba1..9d0d13e7 100644 --- a/blocks/Xcos/blocks/CSCOPE.py +++ b/blocks/Xcos/blocks/CSCOPE.py @@ -12,7 +12,6 @@ def CSCOPE(outroot, attribid, ordering, geometry, parameters): addExprsNode(outnode, TYPE_STRING, 10, parameters) addSciDBNode(outnode, TYPE_DOUBLE, AS_REAL_PARAM, 4, realParts=[0.0, -2.7, -2.0, 1.0]) - # print(parameters) param = strarray(parameters) addPrecNode(outnode, TYPE_INTEGER, AS_INT_PARAM, 15, param) diff --git a/blocks/Xcos/common/AAAAAA.py b/blocks/Xcos/common/AAAAAA.py index 6ceb3fd8..6850a925 100644 --- a/blocks/Xcos/common/AAAAAA.py +++ b/blocks/Xcos/common/AAAAAA.py @@ -423,13 +423,8 @@ def strarray(parameter): parameters.pop(12) parameters = parameters[0:15] return parameters -# def addExprsNode(node, subNodeType, height, parameters): -# width = 1 if height > 0 else 0 -# subNode = addDataNode(node, subNodeType, **{'as': 'exprs'}, -# height=height, width=width) -# for i in range(height): -# addDataData(subNode, parameters[i]) -# return subNode + + # Convert number into scientific notation # Used by blocks Capacitor,ConstantVoltage,Inductor and Resistor diff --git a/blocks/Xcos/ports/CommandPort.py b/blocks/Xcos/ports/CommandPort.py index e0419a11..7658785b 100644 --- a/blocks/Xcos/ports/CommandPort.py +++ b/blocks/Xcos/ports/CommandPort.py @@ -15,8 +15,4 @@ def CommandPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode diff --git a/blocks/Xcos/ports/ControlPort.py b/blocks/Xcos/ports/ControlPort.py index 8464f273..d2fa0ff5 100644 --- a/blocks/Xcos/ports/ControlPort.py +++ b/blocks/Xcos/ports/ControlPort.py @@ -15,8 +15,4 @@ def ControlPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode diff --git a/blocks/Xcos/ports/ExplicitInputPort.py b/blocks/Xcos/ports/ExplicitInputPort.py index 9343a52a..49d4cbbc 100644 --- a/blocks/Xcos/ports/ExplicitInputPort.py +++ b/blocks/Xcos/ports/ExplicitInputPort.py @@ -21,10 +21,6 @@ def ExplicitInputPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode diff --git a/blocks/Xcos/ports/ExplicitOutputPort.py b/blocks/Xcos/ports/ExplicitOutputPort.py index 35e4a32c..2cc8e66f 100644 --- a/blocks/Xcos/ports/ExplicitOutputPort.py +++ b/blocks/Xcos/ports/ExplicitOutputPort.py @@ -21,10 +21,6 @@ def ExplicitOutputPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode diff --git a/blocks/Xcos/ports/ImplicitInputPort.py b/blocks/Xcos/ports/ImplicitInputPort.py index e0a062f1..bd273801 100644 --- a/blocks/Xcos/ports/ImplicitInputPort.py +++ b/blocks/Xcos/ports/ImplicitInputPort.py @@ -21,8 +21,4 @@ def ImplicitInputPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode diff --git a/blocks/Xcos/ports/ImplicitOutputPort.py b/blocks/Xcos/ports/ImplicitOutputPort.py index bd407fdb..c67a25b3 100644 --- a/blocks/Xcos/ports/ImplicitOutputPort.py +++ b/blocks/Xcos/ports/ImplicitOutputPort.py @@ -21,8 +21,4 @@ def ImplicitOutputPort(outroot, attribid, parentattribid, ordering, geometry, ordering=ordering, parent=parentattribid, style=func_name, value=value) - # addNode(outnode, 'mxGeometry', **{'as': 'geometry'}, - # height=geometry['height'], width=geometry['width'], - # x=geometry['x'], y=geometry['y']) - return outnode |