2026-10-18 22:39:26 +02:00
|
|
|
# Nozzle collision guard: bd_pressure watches the nozzle force during moves
|
|
|
|
|
# that must not touch anything (needs extras/bdp_guard.py and the bd_pressure
|
|
|
|
|
# load-check firmware). See extras/bdp_guard.py.
|
|
|
|
|
#
|
2026-10-18 23:25:28 +02:00
|
|
|
# mode: stop shuts Klipper down on a touch; log only measures and reports
|
|
|
|
|
# each phase (console and klippy.log, "bdp_guard:"). A phase can override it
|
|
|
|
|
# with _GUARD_ON MODE=log (the brush does).
|
|
|
|
|
# Measured 2026-10-18: peaks 1-8 in all phases except the brush (47); a
|
|
|
|
|
# light finger push on the cold nozzle gives 41.
|
2026-10-18 22:39:26 +02:00
|
|
|
|
|
|
|
|
[bdp_guard]
|
|
|
|
|
sensor: bd_pa
|
2026-10-18 23:25:28 +02:00
|
|
|
mode: stop
|
2026-10-18 22:39:26 +02:00
|
|
|
threshold: 30
|
|
|
|
|
samples: 3
|
|
|
|
|
interval: 0.02
|
|
|
|
|
|
|
|
|
|
# M400 first: BDP_GUARD_ARM/DISARM act at once, not in the move queue, so
|
|
|
|
|
# without it the guard would watch moves that are still queued (contact
|
|
|
|
|
# homing, extrusion) or stop watching before the armed moves ran.
|
|
|
|
|
[gcode_macro _GUARD_ON]
|
|
|
|
|
description: Arm the nozzle guard for PHASE=<name> [MODE=log|stop] after the queued moves (nothing without [bdp_guard])
|
|
|
|
|
gcode:
|
|
|
|
|
{% if 'bdp_guard' in printer %}
|
|
|
|
|
M400
|
|
|
|
|
BDP_GUARD_ARM PHASE={params.PHASE|default('armed')} {('MODE=' ~ params.MODE) if 'MODE' in params else ''}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
[gcode_macro _GUARD_OFF]
|
|
|
|
|
description: Disarm the nozzle guard after the queued moves (nothing without [bdp_guard])
|
|
|
|
|
gcode:
|
|
|
|
|
{% if 'bdp_guard' in printer %}
|
|
|
|
|
M400
|
|
|
|
|
BDP_GUARD_DISARM
|
|
|
|
|
{% endif %}
|