Skip to content

Commit

Permalink
Add goto purge bucket and maintenance #493
Browse files Browse the repository at this point in the history
Enable goto purge bucket and maintenance in GUI #493
  • Loading branch information
elpopo-eng committed Feb 23, 2024
1 parent a3034a1 commit 8693775
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions macros/base/park.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions macros/helpers/nozzle_cleaning.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8693775

Please sign in to comment.