aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Command_Templates.md
diff options
context:
space:
mode:
authorPedro Lamas <pedrolamas@gmail.com>2021-10-22 18:24:16 +0100
committerKevinOConnor <kevin@koconnor.net>2021-11-19 11:22:36 -0500
commit7ef7bf608a2e784505439e50c443f24e03f2f3cf (patch)
treec6b876414a92b9a23edc12df487a5afde60532ab /docs/Command_Templates.md
parenta5ec751406c12f063eb464bc4f577279452181ad (diff)
downloadkutter-7ef7bf608a2e784505439e50c443f24e03f2f3cf.tar.gz
kutter-7ef7bf608a2e784505439e50c443f24e03f2f3cf.tar.xz
kutter-7ef7bf608a2e784505439e50c443f24e03f2f3cf.zip
gcode_macro: Add "rawparams" pseudo-variable
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
Diffstat (limited to 'docs/Command_Templates.md')
-rw-r--r--docs/Command_Templates.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/Command_Templates.md b/docs/Command_Templates.md
index f5c670ef..732ed1a1 100644
--- a/docs/Command_Templates.md
+++ b/docs/Command_Templates.md
@@ -129,6 +129,20 @@ gcode:
M140 S{bed_temp}
```
+### The "rawparams" variable
+
+The full unparsed parameters for the running macro can be access via the `rawparams` pseudo-variable.
+
+This is quite useful if you want to change the behavior of certain commands like the `M117`. For example:
+
+```
+[gcode_macro M117]
+rename_existing: M117.1
+gcode:
+ M117.1 { rawparams }
+ M118 { rawparams }
+```
+
### The "printer" Variable
It is possible to inspect (and alter) the current state of the printer