Native dual_carriage support in input shaping

Hi folks,

Recently I’ve made a rework of the input shaping support for dual_carriage. I think in that version it has a chance to be integrated into the mainline Klipper. Alas, I don’t have the hardware to test it. So, if you are interested in this feature, please give it a try. The way the input shaper should be configured for IDEX configuration is described here, but for convenience, here’s a short excerpt:

You should configure input shaping in a start gcode along the lines of

[gcode_macro START_GCODE]
gcode:
    ; ....
    ; Configure Input Shaper
    SET_DUAL_CARRIAGE CARRIAGE=1
    SET_INPUT_SHAPER SHAPER_TYPE_X=MZV SHAPER_FREQ_X=70
    SET_INPUT_SHAPER SHAPER_TYPE_Y=2HUMP_EI SHAPER_FREQ_Y=50
    SET_DUAL_CARRIAGE CARRIAGE=0
    SET_INPUT_SHAPER SHAPER_TYPE_X=EI SHAPER_FREQ_X=60
    SET_INPUT_SHAPER SHAPER_TYPE_Y=2HUMP_EI SHAPER_FREQ_Y=50
    ; ....
    G28
    ; ....

and the printer.cfg should typically only have and empty [input_shaper] section:

[input_shaper]

[dual_carriage]
...

Note that in the start script, it is important to issue the same SET_INPUT_SHAPER SHAPER_TYPE_Y=... SHAPER_FREQ_Y=... command twice for both carriages, at least on hybridx/z kinematics, because it will fill the required input shaper parameters for the inactive stepper kinematics for the carriages (when a carriage is deactivated, its ‘Y’ stepper must still generate steps to let the carriage stay in the same place).

Then one can just issue SET_DUAL_CARRIAGE CARRIAGE=1 and SET_DUAL_CARRIAGE CARRIAGE=0 commands in the tool changing scripts, and the input shaper parameters will be preserved accordingly. Incidentally, SHAPER_CALIBRATE should now also work as expected - if one is to activate a given carriage and then run this command, the results of the calibration should be applied to the correct carriage.