How to change a g-code command?

when I define gcode_macro M106, it said M106 already registered, how to change Klipper configuration?

Hi @Yihang,

Since you didn’t upload your klippy.log, my best guess is you defined the macro something like this:

[gcode_macro M106]
gcode: ...

Since the command M106 already exists, you have to add a rename_existing parameter:

[gcode_macro M106]
rename_existing: M106.1
gcode: ...

If you ever need to run the original M106 command, you can use M106.1 in the above example.

thanks for your help, it works.

1 Like

Great! Please mark my post as the solution so other people know this has been resolved.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.