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