diff --git a/macros/base/park.cfg b/macros/base/park.cfg index 0c1196925..a8c4a3e3a 100644 --- a/macros/base/park.cfg +++ b/macros/base/park.cfg @@ -51,3 +51,19 @@ gcode: G1 Z{z_safe} F{Sz} G0 X{Px} Y{Py} F{St} {% endif %} + + +[gcode_macro GOTO_MAINTENANCE] +description: Move over the purge bucket +gcode: + {% set St = printer["gcode_macro _USER_VARIABLES"].travel_speed * 60 %} + {% set Sz = printer["gcode_macro _USER_VARIABLES"].z_drop_speed * 60 %} + + {% if "xyz" not in printer.toolhead.homed_axes %} + G28 ; home if not already homed + {% endif %} + SAVE_GCODE_STATE NAME=GOTO_MAINTENANCE + G90 ; absolute positioning + G0 Z{printer.toolhead.axis_maximum.z/3*2} F{Sz} + G0 X{printer.toolhead.axis_maximum.x/2} Y{printer.toolhead.axis_minimum.y+10} F{St} + RESTORE_GCODE_STATE NAME=GOTO_MAINTENANCE diff --git a/macros/helpers/nozzle_cleaning.cfg b/macros/helpers/nozzle_cleaning.cfg index 8cb799f28..b7a55d08b 100644 --- a/macros/helpers/nozzle_cleaning.cfg +++ b/macros/helpers/nozzle_cleaning.cfg @@ -164,3 +164,10 @@ gcode: RESTORE_GCODE_STATE NAME=CONDITIONAL_MOVE_TO_PURGE_BUCKET_STATE {% endif %} + + +[gcode_macro GOTO_PURGE_BUCKET] +description: Move over the purge bucket (a wrapper to have access in gui) +gcode: + {% set Z_DROP = params.Z_DROP|default(0)|int %} + _CONDITIONAL_MOVE_TO_PURGE_BUCKET \ No newline at end of file