Commit Graph
26 Commits
Author SHA1 Message Date
mangavalkandClaude Opus 5.5 5e8743c33a 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>
2026-11-08 01:39:15 +01:00
mangavalkandClaude Opus 5.5 d8392a81c7 _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 <noreply@anthropic.com>
2026-11-07 16:54:44 +01:00
mangavalkandClaude Opus 5.5 dae8afac20 Move bdpressure_check.py and bdp_guard.py to the bd_pressure repo
Both now live in the fork https://github.com/MangaValk/bd_pressure
(klipper/, branch main, upstream PR markniu/bd_pressure#13), installed by
its klipper/install.sh and its own Moonraker update_manager entry. The fork's
bdpressure_check.py also reads the v2 firmware diagnostics. bdp_touch.py
stays here. Docs and comments point to the bd_pressure repo.

install.sh only links the files it has, so after this update it no longer
overwrites the bd_pressure links. Run ~/bd_pressure/klipper/install.sh
before updating, or the two links are left dangling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 16:52:36 +01:00
mangavalkandClaude Opus 5.5 cc533824e3 PRINT_END: retract 2 mm instead of 5
The slicer already retracts on the last move; 5 mm on top was too much.
The soak retract in _LOAD_FOR_CHAMBER keeps the 5 mm default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 14:36:42 +01:00
mangavalkandClaude Opus 5.5 b415cbebf4 PA values per nozzle: SET_NOZZLE, slicer check, no Spoolman write
A PA value only holds for the nozzle it was measured with, so values are
saved per nozzle and spool (pa_value_0_4_spool_<id>). SET_NOZZLE sets the
fitted size; a different NOZZLE= from the slicer on PRINT_WARMUP stops the
print before anything heats. The existing values are copied to 0.4 once at
the first start; the old variables stay in the file, unread.

Each nozzle has its own test flow and PA range (0.2: 5 mm3/s, 0-0.196,
starting estimates, about 9 min a lane). The test primes at the test flow
instead of 120 mm3/s.

Remove the Spoolman write: it went to localhost and never arrived, and
nothing read the values back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:49:25 +01:00
mangavalkandClaude Opus 5.5 1dcbc50bf6 Bed fans off during prints without a heated chamber, remove unused bed PID
With the chamber open the bed fans only blow room air past the bed. PRINT_WARMUP
sets print_fans_off for CHAMBER 30 or less, _PRINT_CLEANUP clears it. Chamber
prints, the cooldown and heating the bed outside a print are unchanged.

The PID values in PRINT_WARMUP never took effect: the SET_HEATER_TEMPERATURE
override in bed_fans.cfg only passes on the target. The bed keeps its config
values; the misleading console messages are gone.

Tested with rendered macros only, not yet on the printer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 16:18:38 +01:00
mangavalkandClaude Opus 5.5 99b7109b5b Add a bed check: warn about bumps and flatness, pause PRINT_START on a failure
BED_SCAN_CHECK levels, scans and warns, without heating or touching the bed.
extras/mesh_check.py fits a smooth surface to the mesh and reports areas more
than 0.03 mm from it, and a range over 0.30 mm.

In PRINT_START a failed check pauses before the nozzle heats. Resume sets the
print file back to the PRINT_START line (M26), so it runs again as normal file
G-code. BED_CHECK_IGNORE lets the next failed check only warn.

Tested on saved scans and rendered macros only, not yet on the printer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 16:16:36 +01:00
mangavalkandClaude Opus 5.5 e540e40cf7 HEAT_SOAK: resume without AFC, no trip to X0 Y0
A finished soak called RESUME, which goes through AFC_RESUME. HEAT_SOAK pauses
with PAUSE_BASE, so AFC has no saved position and restores 0,0: the toolhead
went to X0 Y0 at Z5 at up to 350 mm/s (AFC.log, 2026-11-04), and _Z_CHECK then
moved straight back. Both nozzle guard stops in z_check (delta -34 and -33)
happened in runs like this, with the toolhead front left. The exact source of
the force is unknown.

Call _RESUME_PRINT directly: it runs RESUME_BASE and skips the purge, because
PAUSE did not park. A manual Resume during a soak still goes through AFC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 02:15:18 +01:00
mangavalkandClaude Opus 5.5 13e49e43c7 Bed soak on bed_side with a minimum time (measured)
Beacon meshes every 3 min on 2026-11-02 showed the 10 mm plate settles
~33 min after the bed reaches 100C with the chamber at 50C, and ~11 min at
60C with the chamber open. The old soak ended far earlier (bed_core within
5C, or the chamber reaching its target). HEAT_SOAK gets MIN_TIME=<minutes>
(default 0); PRINT_WARMUP soaks on bed_side with RATE 0.05 over 120 s,
SOAK_TEMP 70% of the bed target, MIN_TIME 35 (chamber) / 12 (no chamber),
and skips the soak without a bed target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 16:58:20 +01:00
mangavalkandClaude Opus 5.5 87a06f9c30 First layer: AFC fault detection less sensitive
A large, slow first layer tripped AFC's buffer fault detection ("AFC NOT
FEEDING"). _FIRST_LAYER_FAULT_DETECTION ON=1 at the end of PRINT_START
sets first_layer_sensitivity (4: pause after 70 mm instead of 30 mm);
ON=0 restores the [AFC_buffer] config value. The slicer calls ON=0 at
the start of layer 2:
  {if layer_num == 1}_FIRST_LAYER_FAULT_DETECTION ON=0{endif}
_PRINT_CLEANUP calls it too, for prints that end in the first layer.
ON=0 only restores what ON=1 changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:47:11 +02:00
mangavalkandClaude Opus 5.5 0b1b2a6947 Purge check: accept load-check firmware v2; chamber load levels first
- bdpressure_check.py accepted only extension version 1. The sensor now
  runs firmware version 2 (bytes 54-65 unchanged, diagnostics added), so
  every purge check reported bd_pressure as not answering. Accept 1 and 2.
- _LOAD_FOR_CHAMBER: the Blobifier only purges with the QGL applied, so
  the load before the chamber soak skipped its purge (0.0 mm extruded).
  Level the gantry and home Z first when the QGL is not applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 12:12:25 +02:00
mangavalkandClaude Opus 5.5 b9d2f3a062 Nozzle guard in stop mode (brush log-only), wait for the nozzle before HOME
Test print start: guard peaks 1-8 in every phase except the brush scrub
(peak 47, 4 reads above 30 in a row), 0 I2C errors; a light finger push
gives 41. Stop mode for all phases, the brush stays log-only.

The contact homing in HOME restarted 6 times (sample spread too large)
while the nozzle was still heating to 150C; PRINT_WARMUP now waits for a
steady contact temperature first, as PRINT_START does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:25:28 +02:00
mangavalkandClaude Opus 5.5 a16b57a0a9 Move bd_pressure.cfg and TEST_SPEED into the repo
All macros now come from this repo. bd_pressure.cfg ([bdpressure bd_pa]
and the vendor PA_CALIBRATE macros) and Macros/TEST_SPEED.cfg were loose
files in ~/printer_data/config.

PA_CALIBRATE no longer sets Z back to z_current at the end: it was read
before the test ran, so a Z hop in the G28 XY (Beacon home_z_hop) would
leave Klipper believing the nozzle is lower than it is. Z is never switched
off or moved by the test, so it keeps its position without that line.
The ACC_WALL bug (read from ACCEL_TO_DECEL, always 4000) is documented,
not fixed: the cached PA values were measured at 4000.

printer.cfg must drop [include bd_pressure.cfg] and Macros/macros.cfg its
TEST_SPEED include, else the old copies (included later) still win.

Reference values from the load-check-afc branch and from the guard and
Z check tests added to CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:11:02 +02:00
mangavalkandClaude Opus 5.5 61fa8acb05 Print start: contact homing, nozzle guard, Z check, purge before chamber heat
- HOME always homes Z with Beacon contact and recalibrates, also when the
  printer is already homed (home_method_when_homed = proximity used the
  model of an earlier print without touching the bed). PRINT_START homes
  Z again after QGL, before the brush takes the nozzle below Z0.
- _Z_CHECK: after the soak, compare Klipper's Z with a BEACON_QUERY
  reading at Z3 over the bed centre and stop the print above 1 mm.
  Warns and continues when BEACON_QUERY leaves no new
  printer.beacon.last_sample.
- Nozzle guard (extras/bdp_guard.py, print/nozzle_guard.cfg): reads the
  bd_pressure force over I2C every 20 ms while armed and, in stop mode,
  shuts Klipper down on a touch. Armed for HOME X/Y, QGL, Z homing, brush,
  mesh and the Z check; starts in log mode to collect peaks per phase.
- Chamber prints: load and purge the first tool before the chamber heats
  (_LOAD_FOR_CHAMBER replaces _UNLOAD_FOR_CHAMBER). A cut unload leaves a
  piece of PLA in the extruder that softened in the hot chamber and jammed
  the ASA load.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 22:39:26 +02:00
mangavalkandClaude Opus 5.5 2100857846 Chamber prints: unload a lane that is not the first tool before the soak
With the chamber heated, a filament left in the toolhead path softens in
the PTFE tube (PLA loaded, ASA print). After the first HOME, PRINT_WARMUP
unloads the loaded lane when it is not mapped to the print's first tool
(PRINT_START would swap it anyway). A failed unload stops the print
before the chamber heats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:56:30 +02:00
mangavalkandClaude Opus 5.5 6cc43f951d Print start: soak before QGL and Z, load after Z, PA per lane temperature
PRINT_WARMUP: bed heats during the warmup, the nozzle only waits while it
is above 170C (Beacon contact limit 180C), one HOME to get over the bed,
then M190 and HEAT_SOAK. No more filament load and 220->150C cycle there.

PRINT_START (on the soaked bed): one QGL, one contact Z calibration, mesh,
heat over the bucket, load the initial tool, PA for all lanes, load the
initial tool again if a calibration changed lanes, G28 X Y reference.
Loading after the contact keeps ooze off the nozzle for the calibration.

PA: calibrate each lane at its own filament temperature (was the
temperature from before CHANGE_TOOL), and apply the loaded lane's PA
after PA_CALIBRATE_ALL_LANES (the last cached lane's PA won before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:46:05 +02:00
mangavalkandClaude Opus 5.5 e5be65834e LEDs: nozzle light follows the motion sensor, new logo status macro
The motion timeout switched the nozzle LEDs off during prints, motion
switched them off when idle or paused, the timeout counted from the first
movement, and every _status_* macro stopped the nozzle light.

- _LIGHTS sets case light and nozzle LEDs from presence, print state and
  CASELIGHT MODE=AUTO|ON|OFF; the timeout (60 s) starts at the sensor
  release
- _STATUS STATE=... replaces the _status_* macros; logo effects only
  cover the logo LEDs and use REPLACE=1
- heater gauge while heating, print progress, paused, error flash from
  _ERROR, part ready once the bed is cool, dim night mode when idle and
  nobody near, cleaning during BLOBIFIER_CLEAN
- removed unused effects and macros, 12 fps for the toolhead effects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:32:42 +02:00
mangavalkandClaude Opus 5.5 fbdb2d5e1d Show errors and warnings on the display (_ERROR, _WARN)
action_raise_error aborts while the macro renders, so an M117 in the same
macro never ran and errors such as the RESUME lane check only reached the
console. messages.cfg adds _ERROR (M117, then raise in a separate macro)
and _WARN (RESPOND TYPE=error + M117); all errors and warnings use them.
PAUSE shows AFC's error as the pause reason; RESUME, CANCEL_PRINT and
PRINT_WARMUP clear the display.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:41:41 +02:00
mangavalkandClaude Opus 5.5 a67e99015f RESUME: check the AFC lane, add AFC_CLEAR_ALL_MESSAGES
PAUSE stores the lane the print needs (AFC's next_lane during a failed
tool change, otherwise the loaded lane). RESUME stops with an error when
another lane or none is loaded; RESUME LANE_CHECK=0 skips the check.

AFC_CLEAR_ALL_MESSAGES clears AFC's whole message queue
(AFC_CLEAR_MESSAGE only removes the first message).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:12:53 +02:00
mangavalkandClaude Opus 5.5 536db5836d Purge check: fail when bd_pressure does not answer, add override
A bd_pressure that does not answer used to be reported as "pressure
skipped" and the purge passed unchecked. It now fails the check, so in
enforce mode the printer pauses (and a resume purge stays paused).
PURGE_CHECK_IGNORE_SENSOR lets purges pass without the sensor until the
print ends; _PRINT_CLEANUP clears it so the next print checks again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:18:21 +02:00
mangavalkandClaude Opus 5.5 93f00c87a7 Stop using bdwidth while printing, work without it
bdwidth's motion reading stays at 0, its per-reading width compensation
made the flow jump between 77 and 119%, and a USB dropout shut down
Klipper. PRINT_START no longer enables it. _PRINT_CLEANUP,
BLOBIFIER_CHECKED and PURGE_UNTIL_EMPTY only send bdwidth commands when
[bdwidth fila_width_0] exists, and bdwidth_status reports present: False
with neutral values when it is not configured, so the section can be
removed from printer.cfg.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:18:40 +02:00
mangavalkandClaude Opus 5.5 eb7e0d4482 Purge and check before resuming after a PAUSE
_RESUME_PRINT purges 40 mm with BLOBIFIER_CHECKED (instead of the 2 mm
unretract), so the nozzle is primed, wiped and checked before going back
to the print. A failed purge check raises an error that aborts the whole
resume, AFC_RESUME's restore included, so the printer stays paused; the
next RESUME checks again. RESUME PURGE=0 skips the purge.

The purge check records a failure in _PURGE_CHECK_CFG.last_failed, since
its PAUSE has no effect while the printer is already paused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 14:08:53 +02:00
mangavalkandClaude Opus 5.5 b6379621f6 bdwidth: width only in PRINT_START
The CCD motion reading stays at 0 (actual_total_move:0), so motion mode
only produced false "Rounout" messages. ENABLE_WIDTH keeps the flow
compensation and the runout on a missing width; clogs and breaks are
left to AFC's buffer fault detection (filament_error_sensitivity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:31:43 +02:00
mangavalkandClaude Opus 5.5 e152246e9f 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>
2026-10-11 15:01:55 +02:00
mangavalkandClaude Opus 5.5 9dc733b5bb Fix pause/resume chain, shared print cleanup, add CLAUDE.md
- RESUME is defined only in print/pause_resume.cfg; heat_soak.cfg's
  duplicate replaced it (no unretract, no fan restore). It now runs
  HEAT_SOAK_RESUME -> _RESUME_PRINT -> RESUME_BASE.
- PAUSE runs PAUSE_BASE first, then retracts and parks once (X20 Y345);
  a parked flag makes resume undo only what PAUSE did.
- New _PRINT_CLEANUP shared by PRINT_END and CANCEL_PRINT: heaters incl.
  iHEATER_OFF, fan, M221 S100, bdwidth off, mesh and skew cleared.
  In PRINT_END it runs after RESTORE_GCODE_STATE so the flow reset sticks.
- Add CLAUDE.md and tools/effective_config.py.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:20:28 +02:00
mangavalkandClaude Opus 5.5 eaf9c82617 Group macros by topic, add Blobifier, fix first tool change
- Split the macro files into folders by topic (print, heating, afc,
  pressure_advance, spoolman, leds, sensors); klipper-macros.cfg is the
  one file printer.cfg includes. Macros moved unchanged; the effective
  config is identical apart from the paths of the PA shell scripts.
- Add the modified Blobifier (Turtleblobifier for AFC) and define
  [save_variables] once in save_variables.cfg instead of in both
  blobifier.cfg and the PA macros (same file, bd_pa_variables.cfg).
- PRINT_WARMUP: heat to the loaded lane's temperature before the first
  tool change. AFC skips heating when the loaded lane's tool number is
  not in the print file's temperature list, and the unload then failed
  below min_extrude_temp.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 14:24:37 +02:00