Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove [SAVE|RESTORE]_GCODE_STATE from PRINT_END macro #452

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions firmware/klipper_configurations/M8P/Voron2_M8P_config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,12 @@ gcode:
[gcode_macro PRINT_END]
# Use PRINT_END for the slicer ending script - please customise for your slicer of choice
gcode:
SAVE_GCODE_STATE NAME=STATE_PRINT_END

M400 ; wait for buffer to clear
G92 E0 ; zero the extruder
G1 E-10.0 F3600 ; retract filament

G91 ; relative positioning
G0 Z1.00 X20.0 Y20.0 F20000 ; move nozzle to remove stringing
TURN_OFF_HEATERS
Expand All @@ -550,4 +553,10 @@ gcode:
G0 X125 Y250 F3600 ; park nozzle at rear
BED_MESH_CLEAR

# The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE
# command pair is to restore the printer's coordinate system
# and speed settings since the commands above change them.
# However, to prevent any accidental, unintentional toolhead
# moves when restoring the state, explicitly set MOVE=0.
RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0

Original file line number Diff line number Diff line change
Expand Up @@ -560,17 +560,23 @@ gcode:
{% 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

TURN_OFF_HEATERS

G90 ; absolute positioning
G0 X{x_safe} Y{y_safe} Z{z_safe} F20000 ; move nozzle to remove stringing
G0 X{th.axis_maximum.x//2} Y{th.axis_maximum.y - 2} F3600 ; park nozzle at rear
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END

# The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE
# command pair is to restore the printer's coordinate system
# and speed settings since the commands above change them.
# However, to prevent any accidental, unintentional toolhead
# moves when restoring the state, explicitly set MOVE=0.
RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0
10 changes: 8 additions & 2 deletions firmware/klipper_configurations/SKR_1.3/Voron2_SKR_13_Config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ gcode:
{% 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 +576,10 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END

# The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE
# command pair is to restore the printer's coordinate system
# and speed settings since the commands above change them.
# However, to prevent any accidental, unintentional toolhead
# moves when restoring the state, explicitly set MOVE=0.
RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0
10 changes: 8 additions & 2 deletions firmware/klipper_configurations/SKR_1.4/Voron2_SKR_14_Config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ gcode:
{% 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 +576,10 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END

# The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE
# command pair is to restore the printer's coordinate system
# and speed settings since the commands above change them.
# However, to prevent any accidental, unintentional toolhead
# moves when restoring the state, explicitly set MOVE=0.
RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0
10 changes: 8 additions & 2 deletions firmware/klipper_configurations/Spider/Voron2_Spider_Config.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ gcode:
{% 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 +519,10 @@ gcode:
M107 ; turn off fan

BED_MESH_CLEAR
RESTORE_GCODE_STATE NAME=STATE_PRINT_END

# The purpose of the SAVE_GCODE_STATE/RESTORE_GCODE_STATE
# command pair is to restore the printer's coordinate system
# and speed settings since the commands above change them.
# However, to prevent any accidental, unintentional toolhead
# moves when restoring the state, explicitly set MOVE=0.
RESTORE_GCODE_STATE NAME=STATE_PRINT_END MOVE=0