pause/resume macro

This commit is contained in:
Siwat Sirichai 2023-12-26 00:33:44 +07:00
parent d239eb8ccb
commit a2a3361d6c
1 changed files with 27 additions and 1 deletions

View File

@ -400,6 +400,9 @@ gcode:
gcode: gcode:
G0 X345 Y345 F3600 G0 X345 Y345 F3600
[gcode_macro PARK_NOZZLE_FRONT]
gcode:
G0 X15 Y15 F3600
[gcode_macro PRINT_START] [gcode_macro PRINT_START]
gcode: gcode:
@ -439,7 +442,6 @@ gcode:
G90 ; absolute positioning G90 ; absolute positioning
PARK_NOZZLE_REAR ; park nozzle PARK_NOZZLE_REAR ; park nozzle
M84 ; disable motors M84 ; disable motors
BED_MESH_CLEAR ; clear bed mesh
SET_LED LED="hotend_rgb" RED=1 GREEN=1 BLUE=1 SYNC=0 TRANSMIT=1 ; turn on hotend LED SET_LED LED="hotend_rgb" RED=1 GREEN=1 BLUE=1 SYNC=0 TRANSMIT=1 ; turn on hotend LED
[gcode_macro LOAD_FILAMENT] [gcode_macro LOAD_FILAMENT]
@ -455,6 +457,30 @@ gcode:
G1 E-50 F3000 G1 E-50 F3000
G1 E-50 F3000 G1 E-50 F3000
[gcode_macro PAUSE]
gcode:
{ action_respond_info('Pausing printer') }
SAVE_GCODE_STATE NAME=PAUSE
M83 ; relative extrusion
G1 E-5 F3600 ; retract filament
G91 ; relative positioning
G1 Z5 F3600 ; move nozzle up 5mm
G90 ; absolute positioning
PARK_NOZZLE_FRONT ; park nozzle
PAUSE_PRINT
[gcode_macro RESUME]
gcode:
{ action_respond_info('Resuming printer') }
{ % set IS_PAUSED = false % }
G91 ; relative positioning
G1 Z-5 F3600 ; move nozzle down 5mm
G90 ; absolute positioning
G1 E5 F3600 ; unretract filament
G1 E3 F1500 ; prime the nozzle
RESTORE_GCODE_STATE NAME=PAUSE MOVE=1 ; restore the state and move nozzle back to where it was
#*# <---------------------- SAVE_CONFIG ----------------------> #*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*# #*#