Skip to content

v2.5.1: print-start gate uses filament_exist, not the idle motion sensor - #22

Closed
bbolinger wants to merge 1 commit into
mainfrom
fix/filament-loaded-gate
Closed

v2.5.1: print-start gate uses filament_exist, not the idle motion sensor#22
bbolinger wants to merge 1 commit into
mainfrom
fix/filament-loaded-gate

Conversation

@bbolinger

Copy link
Copy Markdown
Owner

Print-start gate no longer refuses a loaded-but-idle tool

The preflight check that confirms filament is loaded before a print starts was reading the tool's motion sensor (filament_motion_sensor.filament_detected). That sensor only reads true while filament is actively moving through a feeding head. At the moment you approve a print every tool is idle, so a genuinely loaded tool (filament_exist=True, visible colour/material) read as "not loaded" and the start was refused.

Verified against the live U1: a real PLA print on T3 refused with exists=True, motion_detected=False, feed_detected=True. With the fix the same case passes; a genuinely empty tool (filament_exist=False) still blocks.

Change

  • u1_toolmap.summarize gates on filament_exist (the printer's per-tool loaded/not-loaded flag) instead of the motion/feed sensors. The motion sensor is the printer's own runout mechanism during a print, not a pre-start loaded check.
  • Regression tests: idle loaded tool (exists=True, motion/feed False) must not block; empty tool (exists=False) must block.

Latent until now because prior drills always ended at grace-cancel, never reaching a real (non-cancelled) start where this preflight fires.

Verification

Full suite: 1018 passed, 8 skipped. Reproduced the exact live failing case (PLA/T3) and confirmed the gate now allows it while still blocking an empty tool.

…arts

The material/preflight gate refused to start when a tool's filament_motion_sensor
read filament_detected=False. That sensor only registers while filament is
actively MOVING through a feeding head; at pre-start every tool is idle, so a
genuinely loaded tool (filament_exist=True, visible colour/material) read as "not
loaded" and the start was blocked. Verified against the live U1 2026-07-15: a
real PLA print on T3 refused with exists=True, motion=False, feed=True.

Gate on the per-tool loaded flag (filament_exist) instead; the motion sensor is
the printer's own runout mechanism DURING a print. A genuinely empty tool
(filament_exist=False) still blocks — fail-closed preserved. Regression tests:
an idle loaded tool (exists=True, motion/feed False) must not block; an empty
tool (exists=False) must block.

Latent until now because prior drills always ended at grace-CANCEL and never
pushed through to a real (non-cancelled) start where this preflight fires.

Bump to 2.5.1.
@bbolinger

Copy link
Copy Markdown
Owner Author

Closing: this change gated the start on filament_exist, which is a software-assigned flag (set via the UI / POST /printer/filament_detect/set), not a physical sensor. It read True both while the filament was physically loaded AND while it was parked/unloaded, so gating on it would let a not-actually-loaded tool through (fail-open). The original gate reads the per-channel filament_motion_sensor (a hardware switch at each feed, pin eN:PA1), which correctly reflects physical presence. The original fail-closed gate is correct; reverted on the box.

@bbolinger bbolinger closed this Jul 15, 2026
@bbolinger
bbolinger deleted the fix/filament-loaded-gate branch July 15, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant