diff options
author | Damien <damlobster@gmail.com> | 2021-07-22 00:40:40 +0200 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2021-07-27 13:15:25 -0400 |
commit | cff61605fb7260ab60d1abd4e295b71a533869ac (patch) | |
tree | f117dd64e85ec18a62c7c4305781fa03d37ed0a9 /docs/Command_Templates.md | |
parent | 7e88f9220c641dd1e7e5b748381bd7ac758bc8d2 (diff) | |
download | kutter-cff61605fb7260ab60d1abd4e295b71a533869ac.tar.gz kutter-cff61605fb7260ab60d1abd4e295b71a533869ac.tar.xz kutter-cff61605fb7260ab60d1abd4e295b71a533869ac.zip |
docs : make modifications to all md files to make them compatible with mkdocs
all markdown files must have a single H1 heading at the top.
Signed-off-by: Damien Martin <damlobster@gmail.com>
Update CNAME
Diffstat (limited to 'docs/Command_Templates.md')
-rw-r--r-- | docs/Command_Templates.md | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md index 0d45b7b3..02b92f11 100644 --- a/docs/Command_Templates.md +++ b/docs/Command_Templates.md @@ -1,7 +1,9 @@ +# Commands templates + This document provides information on implementing G-Code command sequences in gcode_macro (and similar) config sections. -### G-Code Macro Naming +## G-Code Macro Naming Case is not important for the G-Code macro name - MY_MACRO and my_macro will evaluate the same and may be called in either upper or @@ -9,7 +11,7 @@ lower case. If any numbers are used in the macro name then they must all be at the end of the name (eg, TEST_MACRO25 is valid, but MACRO25_TEST3 is not). -### Formatting of G-Code in the config +## Formatting of G-Code in the config Indentation is important when defining a macro in the config file. To specify a multi-line G-Code sequence it is important for each line to @@ -27,7 +29,7 @@ Note how the `gcode:` config option always starts at the beginning of the line and subsequent lines in the G-Code macro never start at the beginning. -### Add a description to your macro +## Add a description to your macro To help identify the functionality a short description can be added. Add `description:` with a short text to describe the functionality. @@ -46,7 +48,7 @@ gcode: This will be showing is you use the `HELP` command or use the autocomplete function. -### Save/Restore state for G-Code moves +## Save/Restore state for G-Code moves Unfortunately, the G-Code command language can be challenging to use. The standard mechanism to move the toolhead is via the `G1` command @@ -75,7 +77,7 @@ mode" and the `RESTORE_GCODE_STATE` command restores the state to what it was prior to entering the macro. Be sure to specify an explicit speed (via the `F` parameter) on the first `G1` command. -### Template expansion +## Template expansion <!-- {% raw %} --> The gcode_macro `gcode:` config section is evaluated using the Jinja2 @@ -101,7 +103,7 @@ gcode: RESTORE_GCODE_STATE NAME=clean_nozzle_state ``` -#### Macro parameters +### Macro parameters It is often useful to inspect parameters passed to the macro when it is called. These parameters are available via the `params` @@ -128,7 +130,7 @@ gcode: M140 S{bed_temp} ``` -#### The "printer" Variable +### The "printer" Variable It is possible to inspect (and alter) the current state of the printer via the `printer` pseudo-variable. For example: @@ -169,7 +171,7 @@ gcode: ``` <!-- {% endraw %} --> -### Actions +## Actions There are some commands available that can alter the state of the printer. For example, `{ action_emergency_stop() }` would cause the @@ -193,7 +195,7 @@ Available "action" commands: be provided via keyword arguments, ie: `action_call_remote_method("print_stuff", my_arg="hello_world")` -### Variables +## Variables The SET_GCODE_VARIABLE command may be useful for saving state between macro calls. Variable names may not contain any upper case characters. @@ -221,7 +223,7 @@ gcode: Be sure to take the timing of macro evaluation and command execution into account when using SET_GCODE_VARIABLE. -### Delayed Gcodes +## Delayed Gcodes The [delayed_gcode] configuration option can be used to execute a delayed gcode sequence: @@ -279,7 +281,7 @@ gcode: UPDATE_DELAYED_GCODE ID=report_temp DURATION=0 ``` -### Menu templates +## Menu templates If a [display config section](Config_Reference.md#display) is enabled, then it is possible to customize the menu with @@ -303,7 +305,7 @@ The following actions are available in menu templates: * When `<force>` is set True then it will also stop editing. Default value is False. -### Save Variables to disk +## Save Variables to disk <!-- {% raw %} --> If a |