v2.5.1: print-start gate uses filament_exist, not the idle motion sensor - #22
Closed
bbolinger wants to merge 1 commit into
Closed
v2.5.1: print-start gate uses filament_exist, not the idle motion sensor#22bbolinger wants to merge 1 commit into
bbolinger wants to merge 1 commit into
Conversation
…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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.summarizegates onfilament_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.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.