From f10247a498f2a73f5b2ffab931ff427951bf5342 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Mon, 26 Apr 2021 12:46:22 -0400 Subject: [PATCH] gcode_macro: Deprecate default_parameter_ The Jinja2 "set" directive is more flexible and easier to understand than default_parameter_XXX parameters. Deprecate it and encourage using "set" as a replacement. This also deprecates direct access to parameters via parameter name in a macro. Going forward, the `params` pseudo-variable must be used to access a parameter. Signed-off-by: Kevin O'Connor --- docs/Config_Changes.md | 6 ++++++ docs/Config_Reference.md | 10 ---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/Config_Changes.md b/docs/Config_Changes.md index 64fd43c5..5025d9f7 100644 --- a/docs/Config_Changes.md +++ b/docs/Config_Changes.md @@ -6,6 +6,12 @@ All dates in this document are approximate. # Changes +20210503: The gcode_macro `default_parameter_` config option is +deprecated. Use the `params` pseudo-variable to access macro +parameters. Other methods for accessing macro parameters will be +removed in the near future. See the [Command Templates +document](Command_Templates.md#macro-parameters) for examples. + 20210430: The SET_VELOCITY_LIMIT (and M204) command may now set a velocity, acceleration, and square_corner_velocity larger than the specified values in the config file. diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md index 708b1bec..a4ad4c0a 100644 --- a/docs/Config_Reference.md +++ b/docs/Config_Reference.md @@ -1155,16 +1155,6 @@ G-Code macros (one may define any number of sections with a # A list of G-Code commands to execute in place of "my_cmd". See # docs/Command_Templates.md for G-Code format. This parameter must # be provided. -#default_parameter_: -# One may define any number of options with a "default_parameter_" -# prefix. Use this to define default values for g-code parameters. -# For example, if one were to define the macro MY_DELAY with gcode -# "G4 P{DELAY}" along with "default_parameter_DELAY = 50" then the -# command "MY_DELAY" would evaluate to "G4 P50". To override the -# default parameter when calling the command then using -# "MY_DELAY DELAY=30" would evaluate to "G4 P30". The default is -# to require that all parameters used in the gcode script be -# present in the command invoking the macro. #variable_: # One may specify any number of options with a "variable_" prefix. # The given variable name will be assigned the given value (parsed