Repository navigation
Emit raw RX/TX line events from the GRBL session - #4
Merged
Merged
Conversation
The Rust session consumed every raw line internally; only higher-level events reached Python, so Rayforge's console 'Show verbose' switch had nothing to display anymore (issue barebaric/rayforge#573). The session now notifies embedders about each complete line via SessionEvents::raw_rx (status reports, ok/error acknowledgements, $ replies, welcome banner) and raw_tx (interactive commands and realtime bytes). Both default to no-ops, so existing impls are unaffected. This also fixes a latent event-routing bug the new event volume exposed: a queued __progress__ report was delivered to whichever callback happened to drain its batch. EventDrainer now carries both callbacks and routes progress reports correctly.
This was referenced Oct 17, 2026
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.
Summary
The session consumed every raw line internally; only higher-level events reached Python, so Rayforge's console "Show verbose" switch had nothing left to display (barebaric/rayforge#573).
SessionEvents::raw_rxnow fires for every complete line from the device: status reports,ok/error:acknowledgements,$$/$I replies and the welcome banner.SessionEvents::raw_txfires for interactive commands and realtime bytes (not bulk job streaming).__progress__report was delivered to whichever callback happened to drain its batch;EventDrainernow carries both callbacks and routes progress reports correctly.Test plan
tests/test_grbl_raw_lines.py(5 tests) against the firmware emulator.cargo fmt/cargo clippy -D warnings/ruffclean.