Skip to content

feat(host): deliver //action:* messages via an on_action callback #25

Closed

Description

@CameronBrooks11

Board-initiated //action: messages (e.g. M600 filament change, runout, LCD pause → //action:pause / //action:paused / //action:resume / //action:cancel / //action:prompt …) are parsed (MarlinResponseKind.ACTION, protocol.py:112-113) but then dropped in _await_terminal — the non-terminal else only appends when a collect list is passed, so during send()/stream() they vanish (host.py:431-433).

A proper host must surface these. Add an opt-in on_action: Callable[[MarlinResponse], None] | None (constructor arg) fired whenever an ACTION line is seen, so a consumer can react/forward it. Keep delivery app-neutral (no forced policy); auto-honoring //action:pause/resume/cancel via the host-side pause/stop flags can be a follow-up option.

Needed by the fiberpath machine cutover (fiberpath/fiberpath#195). Part of epic #5. Validate via FakeTransport + the hardware lane.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions