SHAPER_CALIBRATE not compatible with included cfg's

When using SHAPER_CALIBRATE followed by SAVE_CONFIG the action will fail if there is an existing [input_shaper] section in a config file other than the base printer.cfg.

In my case I like to have my printer.cfg file consist only of a couple of wildcard includes for subdirectories and the automatically generated SAVE_CONFIG block.

This way I can use git to sync all my config files and just never touch the printer.cfg so that I don’t have to worry about accidentally overwriting (or conflicting with) any SAVE_CONFIG additions.

All of the other SAVE_CONFIG options work as expected under this configuration. Only the [input_shaper] section seems to take issue with being in an included file.

Is this something that can be easily corrected? Is it just an oversight or is there a reason it’s not compatible?

In the meantime everything works fine if my printer.cfg consists of only the includes, input_shaper, and the SAVE_CONFIG block. But I would prefer to have input_shaper with the rest of my config in the subdirectory if possible!

My printer.cfg

My klipper_config directory minus printer.cfg (and some other files I don’t sync as they contain private info)

Maybe @dmbutyugin could offer some assistance.

@rootiest Alas, the problem is not with SHAPER_CALIBRATE specifically, but with SAVE_CONFIG. Currently, it does not support options in the included files. You’d have the same problem if you had extruder PID options in an included file and then ran PID_CALIBRATE / SAVE_CONFIG. So, unfortunately, you must look at the output of SHAPER_CALIBRATE command in the logs and manually put the value in whatever config file your [input_shaper] config resides.

I see, that makes sense.

So that only applies to the first time you SAVE_CONFIG that value.

Once you have a SAVE_CONFIG/override block created for that particular setting you can move the corresponding section to another file and it will work fine for any future changes.

That’s why I mistakenly thought it was specific to SHAPER_CALIBRATE, I must have created those other SAVE_CONFIG values before splitting my config into multiple files.

I’m guessing the issue is finding the file containing the section that needs to be commented out for the override, as Klipper just merges it all together into one big config regardless of how the files are split up. (what you see in the klippy logs)

I can work with this though, as I can still put all those sections in other files as long as they have had an override created at least once first.

I just tested and I can now put [input_shaper] in another file since it now has an override in the SAVE_CONFIG block in printer.cfg.

Thank you for the clarification!