Skip to content

Commit b68a97d

Browse files
authored
Merge pull request #390 from Sharpe49/signal-debug
Adds the signal ID and the aspect (including text aspect) of each signal head to the signalling debug window
2 parents 3e32567 + 43629bd commit b68a97d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Source/RunActivity/Viewer3D/Popups/SignallingDebugWindow.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,14 @@ public override void PrepareFrame(ElapsedTime elapsedTime, bool updateFull)
215215
}
216216
else if (signalObj != null)
217217
{
218+
var aspects = string.Join(" / ", signalObj.Signal.SignalHeads.Select(
219+
head => $"{head.state}" + (head.TextSignalAspect.Length > 0 ? $" ({head.TextSignalAspect})" : string.Empty)
220+
));
218221
primitives.Add(new DispatcherLabel(currentPosition.WorldLocation,
219222
GetAspect(signalObj.Signal) == DebugWindowSignalAspect.Stop ? Color.Red :
220223
GetAspect(signalObj.Signal) == DebugWindowSignalAspect.Warning ? Color.Yellow :
221224
Color.Green,
222-
String.Format("Signal ({0})", signalObj.Signal.this_sig_lr(MstsSignalFunction.NORMAL)),
225+
$"Signal {signalObj.Signal.thisRef} ({aspects})",
223226
Owner.TextFontDefaultOutlined));
224227
}
225228

0 commit comments

Comments
 (0)