Repository navigation
fix(bg-swap): announce the toolchange to the engine before the stock … - #198
Merged
Merged
Conversation
…pick A full bg swap that is still priming when the T arrives kept extruding while the stock macro carried the head to the print: the engine's interlock (_check_docked) only sees the extruder ACTIVATION, which stock performs ~2.4 s after lifting the head out of the dock, and only between prime chunks. Field log: pick 13:34:26, activation 13:34:28.6, engine notice 13:34:29.8 - 3.5 s of prime at 4 mm/s plus no anti-ooze retract, the blob in front of the wipe tower. ace.py wraps T0-T3: before the stock handler runs, _notify_bg_pick tells the engine (request_pick_abort) and waits up to BG_PICK_NOTICE_WAIT for the handover. The engine stops at its next move boundary while the head is still docked: the prime loop ends cleanly, sets its anti-ooze cushion and records the missing purge for the arrival pick-check; every other polling phase (HEAT, PULL, LD_FEED, LD_GRIP) takes its existing pick-abort path. The bulk retract stays untouchable, a notice outside the polling phases is ignored and the T runs as before. An older engine without the hook, or no engine, is a no-op. Unit tests for both halves (tests/unit/test_bg_pick_notice.py).
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.
…pick
A full bg swap that is still priming when the T arrives kept extruding while the stock macro carried the head to the print: the engine's interlock (_check_docked) only sees the extruder ACTIVATION, which stock performs ~2.4 s after lifting the head out of the dock, and only between prime chunks. Field log: pick 13:34:26, activation 13:34:28.6, engine notice 13:34:29.8 - 3.5 s of prime at 4 mm/s plus no anti-ooze retract, the blob in front of the wipe tower.
ace.py wraps T0-T3: before the stock handler runs, _notify_bg_pick tells the engine (request_pick_abort) and waits up to BG_PICK_NOTICE_WAIT for the handover. The engine stops at its next move boundary while the head is still docked: the prime loop ends cleanly, sets its anti-ooze cushion and records the missing purge for the arrival pick-check; every other polling phase (HEAT, PULL, LD_FEED, LD_GRIP) takes its existing pick-abort path. The bulk retract stays untouchable, a notice outside the polling phases is ignored and the T runs as before. An older engine without the hook, or no engine, is a no-op.
Unit tests for both halves (tests/unit/test_bg_pick_notice.py).