From ab6b6924aa9575a26f2b45e1061125be8f931cba Mon Sep 17 00:00:00 2001 From: Peter Akers Date: Wed, 13 May 2026 10:27:26 +1000 Subject: [PATCH 1/2] overload cookbook example --- docs/conf.py | 2 +- docs/exrail/cookbooks/index.rst | 1 + docs/exrail/cookbooks/overload-messsage.rst | 28 +++++++++++++++++++++ docs/index.rst | 20 +++++++-------- 4 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 docs/exrail/cookbooks/overload-messsage.rst diff --git a/docs/conf.py b/docs/conf.py index 930842e3e6..7e1dffd2f5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -38,7 +38,7 @@ # 'sphinx.ext.ifconfig', # 'sphinx.ext.viewcode', # 'sphinx.ext.graphviz', - 'sphinx_sitemap', + # 'sphinx_sitemap', # 'sphinx.ext.inheritance_diagram', 'sphinxcontrib.spelling', 'sphinx_toolbox.collapse', diff --git a/docs/exrail/cookbooks/index.rst b/docs/exrail/cookbooks/index.rst index faefb57a12..5a0e6f4ae4 100644 --- a/docs/exrail/cookbooks/index.rst +++ b/docs/exrail/cookbooks/index.rst @@ -31,6 +31,7 @@ The following cookbooks are currently available: vpins animation-sensors estop-button + overload-messsage .. toctree:: :maxdepth: 2 diff --git a/docs/exrail/cookbooks/overload-messsage.rst b/docs/exrail/cookbooks/overload-messsage.rst new file mode 100644 index 0000000000..5e886474fa --- /dev/null +++ b/docs/exrail/cookbooks/overload-messsage.rst @@ -0,0 +1,28 @@ +.. include:: /include/include.rst +.. include:: /include/include-l2.rst +.. include:: /include/include-ex-r.rst +|EX-R-LOGO| + +************************************** +Message on Overload or Short Circuit +************************************** + +|SUITABLE| |tinkerer| |engineer| |support-button| + +``ONOVERLOAD(output)`` will start a sequence when an overload or short circuit is detected on the track/output. |BR| +``MESSAGE(message)`` will display a message on all throttles. |BR| +``AFTEROVERLOAD(output)`` will continute the sequence at this point after the overload or short circuit is cleared. + +.. code-block:: cpp + + ONOVERLOAD(A) + PRINT("Overload Detected on A") + BROADCAST("Overload Track A") + MESSAGE("Overload Track A") + AFTEROVERLOAD(A) + DELAY(2000) + BROADCAST("Overload Track A - Cleared") + MESSAGE("Overload Track A - Cleared") + DONE + +For tracks/outputs B-H, duplicate the entire block above and replace 'A' with the appropriate track/output letter. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index e3d8b1ba99..a9db47abfa 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -98,7 +98,7 @@ DCC-EX Model Railroading :hidden: :maxdepth: 4 - EXRAIL & TRACK MANAGER + PURCHASING & MERCHANDISE .. toctree:: :hidden: @@ -110,25 +110,19 @@ DCC-EX Model Railroading :hidden: :maxdepth: 4 - SUPPORT & INFO - -.. toctree:: - :hidden: - :maxdepth: 4 - - DOWNLOADS + SUPPORT, INFO & IDEAS .. toctree:: :hidden: :maxdepth: 4 - PURCHASING & MERCHANDISE + EXRAIL & TRACK MANAGER .. toctree:: :hidden: :maxdepth: 4 - DETAILED INFORMATION + REFERENCE & DETAILED INFO .. .. toctree:: .. :hidden: @@ -139,6 +133,12 @@ DCC-EX Model Railroading .. external-references/standards .. reference/accessories/index +.. toctree:: + :hidden: + :maxdepth: 4 + + DOWNLOADS + .. toctree:: :hidden: :maxdepth: 4 From f3fd8daabd32f4f59101f64c6ceadf9d60792c07 Mon Sep 17 00:00:00 2001 From: Peter Akers Date: Wed, 13 May 2026 10:29:39 +1000 Subject: [PATCH 2/2] Update examples.rst --- docs/exrail/examples.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/exrail/examples.rst b/docs/exrail/examples.rst index aa03b9461e..e714356b97 100644 --- a/docs/exrail/examples.rst +++ b/docs/exrail/examples.rst @@ -27,6 +27,9 @@ Objects: - Active low IR sensors connected to Mega2560 I/O pins 40 through 46 - An active low push button on Mega2560 I/O pin 30 + +Also see the :doc:`/exrail/cookbooks/index` for a collection of step-by-step instructions for building various |EX-R| based sequences and components for your model railroad. + ---- Turn Track Power On at Startup