From d8392a81c7e7b4676629a6c52826e5be528f2b1f Mon Sep 17 00:00:00 2001 From: MangaValk Date: Sat, 7 Nov 2026 16:54:44 +0100 Subject: [PATCH] _PRINT_CLEANUP: clear AFC runout lanes at the end of every print Infinite spool (SET_RUNOUT) is set up per print; after a print end or cancel every lane with a runout lane gets SET_RUNOUT RUNOUT=NONE. Lanes without one are skipped, so the console stays quiet. Co-Authored-By: Claude Opus 5.5 --- macros/print/print_start_end.cfg | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macros/print/print_start_end.cfg b/macros/print/print_start_end.cfg index 90732a0..6a5c2fa 100644 --- a/macros/print/print_start_end.cfg +++ b/macros/print/print_start_end.cfg @@ -346,7 +346,7 @@ gcode: # End-of-print cleanup shared by PRINT_END and CANCEL_PRINT [gcode_macro _PRINT_CLEANUP] -description: Heaters (incl. chamber heater) and part fan off, flow back to 100%, bdwidth off, mesh and skew cleared, nozzle guard off +description: Heaters (incl. chamber heater) and part fan off, flow back to 100%, bdwidth off, mesh and skew cleared, nozzle guard off, AFC runouts cleared gcode: _GUARD_OFF ; a print start that failed while it was armed _BED_CHECK_RESET ; cancelled while the bed check had it paused @@ -364,6 +364,12 @@ gcode: SET_GCODE_VARIABLE MACRO=_PURGE_CHECK_CFG VARIABLE=ignore_missing_sensor VALUE=False {% endif %} _FIRST_LAYER_FAULT_DETECTION ON=0 ; a print that ended during the first layer + # Infinite spool is set up per print (SET_RUNOUT): clear every lane's runout + {% if 'AFC' in printer %} + {% for lane in printer.AFC.lanes|default([]) if printer["AFC_stepper " ~ lane].runout_lane|default(none) %} + SET_RUNOUT LANE={lane} RUNOUT=NONE + {% endfor %} + {% endif %} # AFC buffer fault detection (filament_error_sensitivity, 0-10, higher = # pauses sooner) with its own value during the first layer.