DangerKlippers / danger-klipper

Klipper but... Dangerous
GNU General Public License v3.0
255 stars 83 forks source link

Don't consider included config options in conflict during SAVE_CONFIG when the have the same value as the one we are saving #385

Closed dberlin closed 1 month ago

dberlin commented 1 month ago

Right now, the include conflict detection of SAVE_CONFIG only checks whether we are trying to save an option that already exists in an included file.

In practice, these options are fine unless they actually conflict with the value we are trying to save.

An example is that i have the extruder heating config in an included file, and because you have to set a control mechanism, i set the control mechanism there (MPC in this case)

However, after calibration, it wants to also now wants to save the control type in the auto-save config.

Right now, SAVE_CONFIG considers this a conflict, even though it is saving the same value in both cases (mpc).

I will add a PR that makes SAVE_CONFIG only consider this a conflict if the two options actually differ. (it also updates the error message to print the conflicting values when they conflict)

dberlin commented 1 month ago

386 fixes this

rogerlz commented 1 month ago

thank you