Skip to content

Commit da1b37f

Browse files
committed
Add documentation for ETCS DMI
1 parent 38b2e0f commit da1b37f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

Source/Documentation/Manual/features-rollingstock.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,9 @@ Use the following .eng paramater to load an electric power supply script::
806806
The .cs extension is optional. "Default" will load the generic OR power supply
807807
implementation, so do `not` use this name for your own script.
808808

809+
810+
.. _features-scripting-tcs:
811+
809812
Train Control System
810813
--------------------
811814

@@ -919,6 +922,17 @@ which returns a handle for the player locomotive instance of the MSTSLocomotive
919922
class. Through such handle all public classes, methods and variables of
920923
the OR Simulation environment can be accessed within the script.
921924

925+
The Train Control System class provides the ETCSStatus field, which controls the information
926+
to be displayed in the ETCS DMI. For example, the following block orders the DMI to show the circular speed gauge in yellow colour as the train approaches a speed restriction:
927+
928+
.. code-block:: csharp
929+
930+
ETCSStatus.CurrentMonitor = Monitor.TargetSpeed;
931+
ETCSStatus.CurrentSupervisionStatus = SupervisionStatus.Indication;
932+
ETCSStatus.TargetDistanceM = 1234.5f;
933+
ETCSStatus.AllowedSpeedMpS = 50;
934+
ETCSStatus.InterventionSpeedMpS = 52.5f;
935+
ETCSStatus.TargetSpeedMpS = 25;
922936
923937
.. index::
924938
single: MultiStateDisplay

Source/Documentation/Manual/options.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,18 @@ system ETCS.
684684
Units ( KM_PER_HOUR )
685685
)
686686

687+
It is also possible to display the full ETCS display using the following block
688+
instead::
689+
690+
ScreenDisplay (
691+
Type ( ORTS_ETCS SCREEN_DISPLAY )
692+
Position ( 280 272 320 240 )
693+
Units ( KM_PER_HOUR )
694+
)
695+
696+
The information displayed in the DMI is controlled via the TCS script. For more details,
697+
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
698+
687699
Load day/night textures only when needed
688700
----------------------------------------
689701

0 commit comments

Comments
 (0)