IDE: Fix wrong red wire coloring in FBD, this time for good.
--- a/PLCControler.py Fri Dec 06 12:16:07 2024 +0100
+++ b/PLCControler.py Sun Dec 08 11:41:31 2024 +0100
@@ -1357,12 +1357,7 @@
return [x for x, _y in TypeHierarchy_list if not x.startswith("ANY")]
def IsOfType(self, typename, reference, debug=False):
- if typename is None or reference is None:
- return True
-
- typename = typename.upper()
- reference = reference.upper()
- if typename == reference:
+ if reference is None or typename == reference:
return True
basetype = TypeHierarchy.get(typename)
--- a/plcopen/pou_block_instances.xslt Fri Dec 06 12:16:07 2024 +0100
+++ b/plcopen/pou_block_instances.xslt Sun Dec 08 11:41:31 2024 +0100
@@ -112,6 +112,9 @@
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
+ <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
+ <xsl:value-of select="local-name()"/>
+ </xsl:template>
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived">
<xsl:value-of select="@name"/>
</xsl:template>
@@ -121,9 +124,6 @@
<xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:wstring">
<xsl:text>WSTRING</xsl:text>
</xsl:template>
- <xsl:template match="*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*">
- <xsl:value-of select="local-name()"/>
- </xsl:template>
<xsl:template name="VariableBlockInfos">
<xsl:param name="type"/>
<xsl:variable name="expression">
--- a/plcopen/pou_block_instances.ysl2 Fri Dec 06 12:16:07 2024 +0100
+++ b/plcopen/pou_block_instances.ysl2 Sun Dec 08 11:41:31 2024 +0100
@@ -102,6 +102,10 @@
}
}
+ template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*" {
+ > «local-name()»
+ }
+
template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/ppx:derived" {
> «@name»
}
@@ -114,10 +118,6 @@
> WSTRING
}
- template "*[self::ppx:type or self::ppx:baseType or self::ppx:returnType]/*" {
- > «local-name()»
- }
-
function "VariableBlockInfos" {
param "type";
variable "expression" > «ppx:expression/text()»