Skip to content

Commit d44c6a8

Browse files
Support ConstantReal
1 parent ca560c0 commit d44c6a8

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
@@ -153,6 +153,15 @@ public void AddXmlToStringBuilder(ulong id, StringBuilder sb)
153153
sb.AppendLine("</Constant>");
154154
sb.AppendLine("</Access>");
155155
}
156+
else if (SignalType == SignalType.ConstantReal && !Name.StartsWith("#"))
157+
{
158+
sb.AppendLine("<Access Scope=\"LiteralConstant\" UId=\"" + id + "\">");
159+
sb.AppendLine("<Constant>");
160+
sb.AppendLine("<ConstantType>Real</ConstantType>");
161+
sb.AppendLine("<ConstantValue>" + Name + "</ConstantValue>");
162+
sb.AppendLine("</Constant>");
163+
sb.AppendLine("</Access>");
164+
}
156165
else if (SignalType == SignalType.ConstantString && !Name.StartsWith("#"))
157166
{
158167
sb.AppendLine("<Access Scope=\"LiteralConstant\" UId=\"" + id + "\">");

0 commit comments

Comments
 (0)