Skip to content

Commit eb58cfc

Browse files
authored
Merge pull request #1225 from flash62au/sphinx
EXRAIL commands - small updates
2 parents 6715a77 + 876a3b0 commit eb58cfc

3 files changed

Lines changed: 31 additions & 16 deletions

File tree

docs/_static/css/dccex_theme.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,10 @@ svg {
442442
width: 60%;
443443
}
444444

445+
.warning-no-clear {
446+
clear: none !important;
447+
}
448+
445449
.note-float-right {
446450
float: right;
447451
width: 40%;

docs/exrail/exrail-command-reference.rst

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ See Also:
2626
- :doc:`/exrail/examples`
2727

2828
.. warning::
29+
:class: warning-no-clear
2930

3031
Do not waste your time asking ChatGPT, Copilot or Gemini to create EXRAIL scripts. They do not understand EXRAIL and will get it wrong 100% of the time.
3132

@@ -626,6 +627,12 @@ Completes a Sequence/Route/Animation/Event handler, and any other automation def
626627
*Parameters:* |BR|
627628
|_| > none
628629

630+
.. Note::
631+
632+
You do not need to use ``DONE`` if you are using ``FOLLOW(id)`` or ``RETURN`` to end the sequence, as these also indicate the end of the sequence.
633+
634+
The currently selected loco will stop moving unless you have used a ``FOLLOW(id)`` or ``RETURN`` to pass control to another sequence. |BR| To prevent this use ``SETLOCO(0)`` before the ``DONE`` statement to deselect the current loco.
635+
629636
|hr-dashed|
630637

631638
.. _endtask:
@@ -647,7 +654,7 @@ Completes a Sequence/Route/Animation/Event handler, and any other automation def
647654
``CALL( id )`` - Branch to a separate sequence
648655
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
649656

650-
Branch to a separate sequence, which will need to RETURN when complete.
657+
Branch to a separate sequence, which will need to `RETURN` when complete. The current sequence is paused until the called sequence has completed.
651658

652659
*Parameters:* |BR|
653660
|_| > **id** - id for the sequence/route/automation to branch to
@@ -705,7 +712,9 @@ Return to the calling sequence when completed (no DONE required).
705712
``FOLLOW( sequence_id )`` - Branch or Follow a specified sequence
706713
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
707714

708-
Branch or Follow a specified sequence. This lets us do clever things like performing a different sequence depending on whether a turnout/point is CLOSED or THROWN, as well as simple things such as the example above where we keep looping through the same sequence.
715+
Branch or Follow a specified sequence. The current sequence ends and control is passed to the specified sequence.
716+
717+
This lets us do clever things like performing a different sequence depending on whether a turnout/point is CLOSED or THROWN, as well as simple things such as the example above where we keep looping through the same sequence.
709718

710719
*Parameters:* |BR|
711720
|_| > **sequence_id** - id for the sequence/route/automation to branch to
@@ -798,6 +807,21 @@ Starts a new task at the given route/animation/sequence and share the current lo
798807

799808
|hr-dashed|
800809

810+
.. _sendloco:
811+
812+
``SENDLOCO( loco, route )`` - Start route/sequence with a specified loco
813+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
814+
815+
Start a new task send a specified loco along a specified route/sequence.
816+
817+
The sequence is started in parallel to the current sequence, so the current sequence continues immediately after the SENDLOCO() command, without waiting for the new sequence to complete.
818+
819+
*Parameters:* |BR|
820+
|_| > **loco** - DCC address of your loco |BR|
821+
|_| > **route** - route to execute using the specified loco
822+
823+
|hr-dashed|
824+
801825
.. _delay:
802826

803827
``DELAY( delay )`` - Delay the sequence a number of milliseconds
@@ -2745,19 +2769,6 @@ Set the loco address for this sequence.
27452769

27462770
|hr-dashed|
27472771

2748-
.. _sendloco:
2749-
2750-
``SENDLOCO( loco, route )`` - Start route/sequence with a specified loco
2751-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2752-
2753-
Start a new task send a specified loco along a specified route/sequence
2754-
2755-
*Parameters:* |BR|
2756-
|_| > **loco** - DCC address of your loco |BR|
2757-
|_| > **route** - route to execute using the specified loco
2758-
2759-
|hr-dashed|
2760-
27612772
.. _read_loco:
27622773

27632774
``READ_LOCO`` - Read loco ID from prog track

docs/exrail/getting-started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ Following commands (e.g. ``SPEED (50)`` ) will be directed at the loco chosen.
595595
Referencing Loco Functions
596596
--------------------------
597597

598-
You can use ``FON( function_no )`` and ``FOFF( function_no )`` to activate and deactivate loco functions… eg sound horn. The loco that the command will be directed to will be the one previously chosen using ``SETLOCO( loco_dcc_address )`` or ``SENDLOCO( ( loco_dcc_address, route_id )``.
598+
You can use ``FON( function_no )`` and ``FOFF( function_no )`` to activate and deactivate loco functions… eg sound horn. The loco that the command will be directed to will be the one previously chosen using ``SETLOCO( loco_dcc_address )`` or ``SENDLOCO( loco_dcc_address, route_id )``.
599599

600600
Referencing Sensors
601601
-------------------

0 commit comments

Comments
 (0)