Skip to content

Commit 2c1a6c6

Browse files
author
sripp
committed
support ConstantUDInt
1 parent 49f90bd commit 2c1a6c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

TiaCodegen/Commands/Signals/Signal.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,15 @@ public void AddXmlToStringBuilder(ulong id, StringBuilder sb)
130130
sb.AppendLine("</Constant>");
131131
sb.AppendLine("</Access>");
132132
}
133+
else if (SignalType == SignalType.ConstantUDInt && !Name.StartsWith("#"))
134+
{
135+
sb.AppendLine("<Access Scope=\"LiteralConstant\" UId=\"" + id + "\">");
136+
sb.AppendLine("<Constant>");
137+
sb.AppendLine("<ConstantType>UDInt</ConstantType>");
138+
sb.AppendLine("<ConstantValue>" + Name + "</ConstantValue>");
139+
sb.AppendLine("</Constant>");
140+
sb.AppendLine("</Access>");
141+
}
133142
else if (SignalType == SignalType.ConstantInt && !Name.StartsWith("#"))
134143
{
135144
sb.AppendLine("<Access Scope=\"LiteralConstant\" UId=\"" + id + "\">");

0 commit comments

Comments
 (0)