Retract at print end, undo it at print start

Klipper's G10 retracts only once until a G11, and nothing sends G11 on
this printer: the G10 in PRINT_WARMUP used up the retract, so PRINT_END
never retracted and the nozzle leaked while cooling down.

- _NOZZLE_RETRACT retracts and remembers the amount in the saved
  variable nozzle_retract (survives restarts, capped at 15 mm).
  PRINT_END retracts 5 mm, PRINT_WARMUP 2 mm, CANCEL_PRINT 5 mm plus the
  park/PAUSE retract.
- _NOZZLE_UNRETRACT in PRINT_START pushes it back over the bucket before
  the wipe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-10-11 15:01:55 +02:00
1 parent 179bd0991b
commit e152246e9f
3 files changed
+61 -3

No files matched your search

+4
View File
@@ -54,6 +54,10 @@ check runs with `motion_check: False`), iHeater chamber heater.
`iHEATER_OFF`, fan, `M221 S100`, bdwidth off). Anything that must happen
at the end of every print goes there. `RESTORE_GCODE_STATE` restores the
flow (M221), so reset flow after it, not before.
- Do not use `G10`/`G11` in macros: Klipper's `G10` retracts only once until
a `G11`, and nothing on this printer sends `G11`. Use `_NOZZLE_RETRACT`
(remembered in the saved variable `nozzle_retract`); `PRINT_START` undoes
it over the bucket with `_NOZZLE_UNRETRACT`.
- Inside `gcode:` use `;` for comments on G-code lines; `#` lines are
stripped by the config parser.
- After a refactor run `python tools/effective_config.py HEAD` and check that