diff --git a/printer.cfg b/printer.cfg index d278968..461a91a 100644 --- a/printer.cfg +++ b/printer.cfg @@ -400,6 +400,9 @@ gcode: gcode: G0 X345 Y345 F3600 +[gcode_macro PARK_NOZZLE_FRONT] +gcode: + G0 X15 Y15 F3600 [gcode_macro PRINT_START] gcode: @@ -439,7 +442,6 @@ gcode: G90 ; absolute positioning PARK_NOZZLE_REAR ; park nozzle 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 [gcode_macro LOAD_FILAMENT] @@ -455,6 +457,30 @@ gcode: 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 ----------------------> #*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated. #*#