SpoolSense UPDATE_TAG also on a cancelled print

Moved from PRINT_END to _PRINT_CLEANUP, which PRINT_END and CANCEL_PRINT
both run, so a cancelled print's filament is deducted too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-11 23:04:36 +01:00
1 parent d51d791a10
commit 385adb5283
1 file changed
+7 -7
+7 -7
View File
@@ -348,16 +348,10 @@ gcode:
RESTORE_GCODE_STATE NAME=STATE_PRINT_END RESTORE_GCODE_STATE NAME=STATE_PRINT_END
# After the restore: RESTORE_GCODE_STATE also restores the flow (M221) # After the restore: RESTORE_GCODE_STATE also restores the flow (M221)
_PRINT_CLEANUP _PRINT_CLEANUP
# SpoolSense (spoolsense.cfg in the config folder, not in this repo): the
# middleware deducts this print's filament and writes it to the spool's
# NFC tag at its next scan
{% if 'gcode_macro UPDATE_TAG' in printer %}
UPDATE_TAG
{% endif %}
# End-of-print cleanup shared by PRINT_END and CANCEL_PRINT # End-of-print cleanup shared by PRINT_END and CANCEL_PRINT
[gcode_macro _PRINT_CLEANUP] [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, auto-resume 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, auto-resume off, SpoolSense tag update
gcode: gcode:
_GUARD_OFF ; a print start that failed while it was armed _GUARD_OFF ; a print start that failed while it was armed
_BED_CHECK_RESET ; cancelled while the bed check had it paused _BED_CHECK_RESET ; cancelled while the bed check had it paused
@@ -384,6 +378,12 @@ gcode:
SET_RUNOUT LANE={lane} RUNOUT=NONE SET_RUNOUT LANE={lane} RUNOUT=NONE
{% endfor %} {% endfor %}
{% endif %} {% endif %}
# SpoolSense (spoolsense.cfg in the config folder, not in this repo): the
# middleware deducts the filament of this print (also a cancelled one) and
# writes it to the spool's NFC tag at its next scan
{% if 'gcode_macro UPDATE_TAG' in printer %}
UPDATE_TAG
{% endif %}
# AFC buffer fault detection (filament_error_sensitivity, 0-10, higher = # AFC buffer fault detection (filament_error_sensitivity, 0-10, higher =
# pauses sooner) with its own value during the first layer. # pauses sooner) with its own value during the first layer.