update docs with dynamic gcode events

This commit is contained in:
Levi Blaney authored and Gina Häußge committed 2021-01-18 16:47:06 +01:00
1 parent e1ac1fa983
commit cd9aab7eef
2 files changed
+37

No files matched your search

+28
View File
@@ -539,6 +539,34 @@ PrintResumed
.. versionchanged:: 1.4.0
${ScriptName}Running
A custom :ref:`GCODE script <sec-features-gcode_scripts>` has started running.
Payload:
* ``name``: the file's name
* ``path``: the file's path within its storage location
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
* ``size``: the file's size in bytes (if available)
* ``owner``: the user who started the print job (if available)
* ``time``: the time needed for the print, in seconds (float)
.. versionadded:: X.X.X
${ScriptName}Finished
A custom :ref:`GCODE script <sec-features-gcode_scripts>` has finished running.
Payload:
* ``name``: the file's name
* ``path``: the file's path within its storage location
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
* ``size``: the file's size in bytes (if available)
* ``owner``: the user who started the print job (if available)
* ``time``: the time needed for the print, in seconds (float)
.. versionadded:: X.X.X
.. _sec-events-available_events-gcode_processing:
GCODE processing
+9
View File
@@ -43,6 +43,15 @@ The following GCODE scripts are sent by OctoPrint automatically:
Plugins may extend these scripts through :ref:`a hook <sec-plugins-hook-comm-protocol-scripts>`.
.. _sec-features-gcode_scripts-events:
Events
------
Every GCODE script that is executed will emit two events. The events will start with the capitalized name of the script.
When ``afterPrintDone`` has started the event will be ``AfterPrintDoneRunning`` and once it has completed the last event
will be ``AfterPrintDoneFinished``. You can find more details in the :ref:`Events <sec-events-available_events-printing>` documentation.
.. _sec-features-gcode_scripts-snippets:
Snippets