I’m trying to write a wrapper for my CLEAN_NOZZLE to make the LEDs do some stuff while cleaning but I ran into a problem that I CANNOT figure out. I’ve boiled the problem down to this:
I noticed when reviewing the klippy.log that when the rename macro is in place the original macro is no longer found. It’s like the pre-processor removed the original and then couldn’t find it on the subsequent rename_existing directive.
Looking closer at the docs, maybe I cannot define a macro and use rename_existing on it with a new macro…
#rename_existing:
# This option will cause the macro to override an existing G-Code
# command and provide the previous definition of the command via the
# name provided here. This can be used to override builtin G-Code
# commands. Care should be taken when overriding commands as it can
# cause complex and unexpected results. The default is to not
# override an existing G-Code command.
It specifies that it can be used to override builtin G-Code commands. I guess we cannot rename_existing macros with this function – only built-in.
I worked around this issue by just completely redefining the complete BOB macro later in my configuration (without the use of redefine_existing) and that seems to be working just fine.