Skip to content

Commit

Permalink
Remove [SAVE|RESTORE]_GCODE_STATE from PRINT_END macro
Browse files Browse the repository at this point in the history
The sample configuration for some boards contain PRINT_END macros
that include [SAVE|RESTORE]_GCODE_STATE command in them.

Unfortunately, those commands may have a negative effect in that
the macro tries to perform some safety moves between them to move
the toolhead away from the print. However, when the GCode state
is restore, Klipper will move the toolhead to the last position
before the GCode state is save. This will negate the safety moves
and put the toolhead back where it was.

Fix this by removing the [SAVE|RESTORE]_GCODE_STATE command.
  • Loading branch information
voidtrance committed Oct 27, 2023
1 parent 917d180 commit 05091a6
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,6 @@ gcode:
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}

SAVE_GCODE_STATE NAME=STATE_PRINT_END

M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
Expand All @@ -573,4 +571,3 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,6 @@ gcode:
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}

SAVE_GCODE_STATE NAME=STATE_PRINT_END

M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
Expand All @@ -576,4 +574,3 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,6 @@ gcode:
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}

SAVE_GCODE_STATE NAME=STATE_PRINT_END

M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
Expand All @@ -576,4 +574,3 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,6 @@ gcode:
{% set y_safe = th.position.y + 20 * (1 if th.axis_maximum.y - th.position.y > 20 else -1) %}
{% set z_safe = [th.position.z + 2, th.axis_maximum.z]|min %}

SAVE_GCODE_STATE NAME=STATE_PRINT_END

M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-5.0 F1800 ; retract filament
Expand All @@ -519,4 +517,3 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END

0 comments on commit 05091a6

Please sign in to comment.