jschuh / klipper-macros

A collection of useful macros for the Klipper 3D printer firmware
GNU General Public License v3.0
921 stars 167 forks source link

[Enhancement] Support multi-level print_end #180

Closed dpeart closed 10 months ago

dpeart commented 11 months ago

At the end of a print I call a macro clean_nozzle.

I would like to include it as part of the print_end macro, similar to how you support multi-steps in print_start. Today I do a print_end, then clean_nozzle, but it ends up parking the head twice, etc. Lots of extraneous moving.

I don't need direct support, but something that can be inserted after retracting the head, but before it is in its final parked location.

Hopefuly this makes sense.

The macro is essentially: `# CLEAN_NOZZLE: Cleans the nozzle by moving it over the brush

[gcode_macro CLEAN_NOZZLE] variable_start_x: 310 variable_start_y: 350 variable_start_z: 11.0 variable_wipe_dist: -50 variable_wipe_qty: 10 variable_wipe_spd: 200 variable_raise_distance: 10

gcode: PARK P=0 X={start_x} Y={start_y} Z={start_z}

Wipe nozzle

{% for wipes in range(1, (wipe_qty + 1)) %} G1 X{start_x + wipe_dist} F{wipe_spd 60} G1 X{start_x} F{wipe_spd 60} {% endfor %} ## Raise nozzle G91 ; relative positioning G1 Z{raise_distance}`

HitLuca commented 10 months ago

Why not putting the call to your macro at the end of klipper-macros/start_end.cfg:_print_end_inner?

dpeart commented 10 months ago

That is what I did. I guess I should close this.