gcode_macro: Parse variable_X parameters using ast.literal_eval()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user