diff options
author | David Smith <davidosmith@gmail.com> | 2020-01-06 10:59:40 -0500 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2020-01-06 10:59:40 -0500 |
commit | 6972b6303dd735a85558012c14b07e76076894e9 (patch) | |
tree | 02ad36048229cc218ad66446a61e9a91002fcbb2 /config/example-extras.cfg | |
parent | baa0d2ff8c9e00596cad695a5bfe7157dfd2e9a8 (diff) | |
download | kutter-6972b6303dd735a85558012c14b07e76076894e9.tar.gz kutter-6972b6303dd735a85558012c14b07e76076894e9.tar.xz kutter-6972b6303dd735a85558012c14b07e76076894e9.zip |
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>
Diffstat (limited to 'config/example-extras.cfg')
-rw-r--r-- | config/example-extras.cfg | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg index 36e6beb7..9c815813 100644 --- a/config/example-extras.cfg +++ b/config/example-extras.cfg @@ -389,7 +389,9 @@ ###################################################################### # G-Code macros (one may define any number of sections with a -# "gcode_macro" prefix). +# "gcode_macro" prefix). If G-Code macro names contain any numbers +# they must all be at the end of the macro's name. +# (example: test_macro25 is acceptable, but macro25_test3 is not). #[gcode_macro my_cmd] #gcode: # A list of G-Code commands to execute in place of "my_cmd". See @@ -409,9 +411,13 @@ # One may specify any number of options with a "variable_" prefix. # The given variable name will be assigned the given value (parsed # as a Python literal) and will be available during macro expansion. -# For example, a config with "variable_fan_speed = 75" might have -# gcode commands containing "M106 S{ fan_speed * 255 }". Variables -# can be changed at run-time using the SET_GCODE_VARIABLE command. +# For example, a macro called set_fan with +# "variable_fan_speed = 75" might have gcode commands containing +# "M106 S{ fan_speed * 255 }". Variables can be changed at run-time +# using the SET_GCODE_VARIABLE command from within any G-Code Macro. +# Example, from a macro called my_macro2 I could state: +# "SET_GCODE_VARIABLE MACRO=set_fan VARIABLE=fan_speed VALUE=50" +# Variable names may not use upper case characters. # Execute a gcode on a set delay. #[delayed_gcode my_delayed_gcode] |