Commit Graph
20 Commits
Author SHA1 Message Date
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 29604b2f1e PA calibration: wider PA range for TPU/TPE
PA_CALIBRATE takes PA_STEP (default 0.002, 0-0.098 over 50 lines).
_PA_CFG.material_pa_step uses 0.004 (0-0.196) for tpu/tpe/flex; soft TPU
measured 0.094, close to the old end. The "no result" rejection uses the
end of the range actually tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:29:02 +02:00
mangavalkandClaude Opus 5.5 93ae8795b8 PA calibration reads Spoolman first; guard resets a sensor left in PA mode
- LANE_CALIBRATE_PA: when a calibration will run, assign the lane's spool
  again (SET_SPOOL_ID) so AFC reads the Spoolman temperature now; AFC
  only reads it at spool assignment and Klipper start (TPU calibrated at
  210C after Spoolman was set to 230C). The calibration moved to
  _LANE_CALIBRATE_PA_RUN, rendered after the refresh.
- bdp_guard: an emergency stop during PA_CALIBRATE leaves the sensor in
  PA mode (FIRMWARE_RESTART does not reset it). When arming, read the
  mode register and switch the sensor back to probe mode with a fresh
  baseline before watching it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:04:40 +02:00
mangavalkandClaude Opus 5.5 d49e65c0bb Flexible lanes load slower; purge at the previous filament's temperature
- flex_lanes.cfg: a 5 s poller sets SET_LONG_MOVE_SPEED to 50 mm/s (AFC's
  minimum) for lanes whose material is TPU/TPE/flex and back to the
  configured long_moves_speed otherwise; reapplied after a restart.
- BLOBIFIER_CHECKED: remembers the temperature of the filament in the
  nozzle (saved nozzle_last_temp). When it is more than flush_margin
  (10C) above the new filament's, the purge runs at that temperature and
  the nozzle cools back afterwards, so the leftover melts out (seen: ASA
  leftover with TPU loaded at 210C).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:59:27 +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 8eef0ee298 bdp_guard: one lock for all I2C transfers of the bd_pressure
The guard's timer read the sensor while G28 ran; bdpressure.py writes the
probe mode at every homing move, and Klipper allows only one I2C request
at a time per device: KeyError ('i2c_response', 1), Klipper shut down
during HOME. The guard now wraps the sensor's i2c in a reactor mutex at
connect; bdpressure and bdpressure_check (now looks up sensor.i2c at
every use) go through it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 23:06:49 +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 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 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 25891640b8 Reject PA calibrations with no result or bad sensor data
bdpressure.py leaves the extruder at the last PA_CALIBRATE test value
(0.098) when it finds no result, and _PA_AFTER_CALIBRATE saved that as
the calibrated PA (lane1 after an AFC pause, lane5 after the sensor went
silent). A run is now rejected, with nothing cached or written to
Spoolman, when the PA is still at the end of the scan, the printer
paused during the test, or bd_pressure gave too few or too few different
readings. The previous valid PA (or fallback_pa) is applied instead.

bdpressure_check reports pa_points and pa_distinct from the bdpressure
module's last PA_CALIBRATE data for this.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:10:06 +02:00
mangavalkandClaude Opus 5.5 82f9486160 README: remove the section on switching from config folder copies
The printer now runs from the repo, so the one-time migration notes are
no longer needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:46:36 +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 e4d2230a57 bdwidth_status: keep a bdwidth USB dropout from shutting down Klipper
bdwidth reads its CH340 from a reactor timer without error handling, so
"write failed: [Errno 5] Input/output error" shut down Klipper mid print.
bdwidth_status now wraps the sensor's Read_bdwidth (bdwidth.py itself
unchanged): on a USB error it closes the port, reports once and returns
False, so bdwidth retries every 10 s; the port is reopened when the
device is back. New status fields usb_ok and usb_errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 18:03:18 +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 179bd0991b Include after AFC, link scripts/ into the config folder
- bd_pa_spoolman.cfg renames AFC's SET_SPOOL_ID, so klipper-macros.cfg
  must be included after [include AFC/*.cfg]; the README said otherwise.
- install.sh links scripts/ as ~/printer_data/config/klipper-macros-scripts
  so the scripts can be edited in Mainsail/Fluidd.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 15:28:52 +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
mangavalkandClaude Opus 5.5 6dbb4ca3fb Initial import of my Klipper macros, modules and scripts
Macros as they run on the printer (Voron 2.4 + AFC Box Turtle +
Blobifier + Beacon + bd_pressure + bdwidth + iHeater), the Klipper
modules they need (xy_drift, bdwidth_status, bdpressure_check), MCU
firmware update scripts, install.sh with Moonraker update manager
support, and READMEs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 13:45:11 +02:00