mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-10 00:07:54 -06:00
gcode_macro: add description property (#4317)
Signed-off-by: Alex Zellner <alexander.zellner@googlemail.com>
This commit is contained in:
parent
ba3bbca861
commit
341fc64a67
3 changed files with 23 additions and 1 deletions
|
@ -124,6 +124,7 @@ class GCodeMacro:
|
|||
self.template = gcode_macro.load_template(config, 'gcode')
|
||||
self.gcode = printer.lookup_object('gcode')
|
||||
self.rename_existing = config.get("rename_existing", None)
|
||||
self.cmd_desc = config.get("description", "G-Code macro")
|
||||
if self.rename_existing is not None:
|
||||
if (self.gcode.is_traditional_gcode(self.alias)
|
||||
!= self.gcode.is_traditional_gcode(self.rename_existing)):
|
||||
|
@ -177,7 +178,6 @@ class GCodeMacro:
|
|||
except ValueError as e:
|
||||
raise gcmd.error("Unable to parse '%s' as a literal" % (value,))
|
||||
self.variables[variable] = literal
|
||||
cmd_desc = "G-Code macro"
|
||||
def cmd(self, gcmd):
|
||||
if self.in_script:
|
||||
raise gcmd.error("Macro %s called recursively" % (self.alias,))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue