Skip to content

Emit raw RX/TX line events from the GRBL session - #4

Merged
knipknap merged 1 commit into
mainfrom
feat/raw-line-events
Oct 17, 2026
Merged

knipknap merged 1 commit into
mainfrom
feat/raw-line-events

Conversation

@knipknap

Copy link
Copy Markdown
Contributor

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_rx now fires for every complete line from the device: status reports, ok/error: acknowledgements, $$/$I replies and the welcome banner.
  • SessionEvents::raw_tx fires for interactive commands and realtime bytes (not bulk job streaming).
  • Both default to no-ops in the trait, so existing embedders are unaffected.
  • 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.

Test plan

  • New tests/test_grbl_raw_lines.py (5 tests) against the firmware emulator.
  • Full suite green (159 tests); cargo fmt/cargo clippy -D warnings/ruff clean.

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.
@knipknap
knipknap merged commit 04ca9a8 into main Oct 17, 2026
6 checks passed
@knipknap
knipknap deleted the feat/raw-line-events branch October 17, 2026 09:47
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