Auto-resume after an AFC buffer fault pause

A NOT FEEDING / CLOG pause during a print runs RESUME by itself after 5 s,
so the lane check and the purge check decide; a failed check keeps the print
paused. At most 2 per print, none within 10 min of printing of the previous
one, only between _PRINT_START_FINISH and the print end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-08 01:39:15 +01:00
1 parent bcb1a53b2a
commit 5e8743c33a
5 files changed
+119 -1

No files matched your search

+9
View File
@@ -16,6 +16,9 @@
# (the lane AFC was loading when a tool change failed, otherwise the loaded
# lane), and RESUME stops with an error when another lane (or none) is loaded.
# RESUME LANE_CHECK=0 resumes anyway (e.g. after remapping with SET_MAP).
# An AFC buffer fault pause ("AFC NOT FEEDING" / "CLOG DETECTED") during a
# print runs this RESUME by itself after a few seconds, within limits
# (afc/auto_resume.cfg).
# A failed bed check in PRINT_START (calibration/bed_scan_check.cfg) pauses with
# _BED_CHECK_STATE.pending set: PAUSE then only pauses, and RESUME runs
# PRINT_START again instead of this chain's purge and lane check.
@@ -51,6 +54,9 @@ gcode:
_STATUS STATE=paused
# Set fan to S28 (28/255 ≈ 0.1098)
M106 S28
{% if 'gcode_macro _AUTO_RESUME_ARM' in printer %}
_AUTO_RESUME_ARM ; AFC buffer fault: resume by itself after the purge check (afc/auto_resume.cfg)
{% endif %}
{% else %}
PAUSE_BASE
{% endif %}
@@ -103,6 +109,9 @@ gcode:
{% endif %}
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=parked VALUE=False
SET_GCODE_VARIABLE MACRO=PAUSE VARIABLE=expected_lane VALUE="''"
{% if 'gcode_macro _AUTO_RESUME_CLEAR_FAULT' in printer %}
_AUTO_RESUME_CLEAR_FAULT
{% endif %}
# Clear the pause reason from the display (no comment on an M117 line: it would show)
M117
{% endif %}
+9 -1
View File
@@ -306,6 +306,11 @@ gcode:
# ("AFC NOT FEEDING"); the slicer switches it back at layer 2
_FIRST_LAYER_FAULT_DETECTION ON=1
# From here on an AFC buffer fault pause resumes by itself (afc/auto_resume.cfg)
{% if 'gcode_macro _AUTO_RESUME_ACTIVE' in printer %}
_AUTO_RESUME_ACTIVE ON=1
{% endif %}
RESPOND MSG="starting"
_STATUS STATE=printing
@@ -346,7 +351,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, AFC runouts cleared
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, auto-resume off
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 +369,9 @@ 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
{% if 'gcode_macro _AUTO_RESUME_ACTIVE' in printer %}
_AUTO_RESUME_ACTIVE ON=0 ; also stops a pending automatic resume
{% endif %}
# 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) %}