mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-08-07 22:14:05 -06:00
docs: Updates for gcode_macro naming (#2317)
Add note about numbers in macro names. Add note about variable name case restriction. Add set variable example. Signed-off-by: David O Smith <davidosmith@gmail.com>
This commit is contained in:
parent
baa0d2ff8c
commit
6972b6303d
2 changed files with 18 additions and 5 deletions
|
@ -1,6 +1,12 @@
|
|||
This document provides information on implementing G-Code command
|
||||
sequences in gcode_macro (and similar) config sections.
|
||||
|
||||
### G-Code Macro Naming
|
||||
Case is not important when creating a G-Code macro name. MY_MACRO and
|
||||
my_macro will evaluate the same and may be called in either upper or
|
||||
lower case. If any numerical digits are used in the macro name they
|
||||
must all be placed at the end of the name.
|
||||
|
||||
### Formatting of G-Code in the config
|
||||
|
||||
Indentation is important when defining a macro in the config file. To
|
||||
|
@ -178,7 +184,8 @@ in future Klipper releases.
|
|||
### Variables
|
||||
|
||||
The SET_GCODE_VARIABLE command may be useful for saving state between
|
||||
macro calls. For example:
|
||||
macro calls. Variable names may not contain any upper case characters.
|
||||
For example:
|
||||
|
||||
```
|
||||
[gcode_macro start_probe]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue