From a6fc0332db703df256ebdad282f5a54b12644149 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Thu, 18 Jan 2024 21:53:02 +0700 Subject: [PATCH] Update printer.cfg --- printer.cfg | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/printer.cfg b/printer.cfg index bb8a456..710ca16 100644 --- a/printer.cfg +++ b/printer.cfg @@ -444,6 +444,23 @@ default_type: echo # Macros ##################################################################### +[gcode_macro CANCEL_PRINT] +rename_existing: BASE_CANCEL_PRINT +gccode: + M220 S100 ; reset speed factor override percentage to default (100%) + M221 S100 ; reset extrusion factor override percentage to default (100%) + {% if printer.extruder.temperature > 170 %} ; if extruder is hot, retract filament + G1 E-3.0 F3600 ; retract filament by 3mm + {% endif %} + {% if printer.toolhead.homed_axis == "xyz" %} ; if XYZ is homed, we can move the nozzle + G91 ; relative positioning + G1 Z+5 F3600 ; move nozzle up 5mm + G90 ; absolute positioning + PARK_NOZZLE_REAR ; park nozzle + {% endif %} + CLEAR_PAUSE + BASE_CANCEL_PRINT + [gcode_macro G32] gcode: G28