Fixed and updated code

Changed the way gcode save states being handled.
This commit is contained in:
gennro 2023-09-16 08:41:45 -08:00
parent 4815891eb3
commit 7fdd35c385

View file

@ -57,7 +57,7 @@ gcode:
{% set current_loc_x = printer.gcode_move.gcode_position.x %}
{% set current_loc_y = printer.gcode_move.gcode_position.y %}
SET_PRESSURE_ADVANCE ADVANCE=0
SAVE_GCODE_STATE NAME=cut_filament_state
{% if ("x" not in printer.toolhead.homed_axes) or ("y" not in printer.toolhead.homed_axes) %}
G28 X Y
@ -86,7 +86,7 @@ gcode:
M400
M117 Filament cut!
RESTORE_GCODE_STATE NAME=MMU_state MOVE=1 MOVE_SPEED={travel_spd} #restores MMU state to bring the toolhead back over the purge block after a cut so no oozing.
RESTORE_GCODE_STATE NAME=cut_filament_state MOVE=1 MOVE_SPEED={travel_spd}
[gcode_macro _MOVE_TO_CUTTER_PIN]
description: helper to move the toolhead to the target pin in either safe or faster way, depending on toolhead clearance.