diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-06-07 19:30:17 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-06-07 19:33:31 -0400 |
commit | 8b005808848dd5395792dba8b9f470ac441c5e72 (patch) | |
tree | d14322e6056d6652d3e15e77fb06698cdf588978 /config/example-extras.cfg | |
parent | 01f3b50e7399f3ea327c6de2130dc16b6f8a27f5 (diff) | |
download | kutter-8b005808848dd5395792dba8b9f470ac441c5e72.tar.gz kutter-8b005808848dd5395792dba8b9f470ac441c5e72.tar.xz kutter-8b005808848dd5395792dba8b9f470ac441c5e72.zip |
gcode_macro: Parse variable_X parameters using ast.literal_eval()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'config/example-extras.cfg')
-rw-r--r-- | config/example-extras.cfg | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/config/example-extras.cfg b/config/example-extras.cfg index 1a7835a1..e418cd3a 100644 --- a/config/example-extras.cfg +++ b/config/example-extras.cfg @@ -1454,11 +1454,11 @@ # the command invoking the macro. #variable_<name>: # One may specify any number of options with a "variable_" prefix. -# The given variable name will then be available during macro -# expansion. For example, a config with "variable_my_name = zebra" -# might have a gcode config containing "M117 My name is {my_name}". -# Variables can be changed at run-time using the SET_GCODE_VARIABLE -# command. +# 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. # Enable the "M118" and "RESPOND" extended commands. |