Skip to content

Develop pybind controller for Python/agentic use cases - #1542

Merged
Gin890 merged 3 commits into
mainfrom
improve-pybind-controller
Oct 8, 2026
Merged

Gin890 merged 3 commits into
mainfrom
improve-pybind-controller

Conversation

@Gin890

@Gin890 Gin890 commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Change the pybind controller to:

  • Not send log to stdout. Python and agent MCP server needs a tidy stdout
  • Change to throw error if any button press is done before the controller is ready. In this way the Python/agent knows the button is not silently dropped.
  • current_status() returns plain text, not HTML text

Gin and others added 3 commits October 6, 2026 21:27
The controller logged through global_logger_command_line(), which also prints
every line to stdout. Python callers, and MCP servers that use stdio for their
protocol, need stdout to stay clean. Log to global_logger_raw() instead; lines
still reach every listener of the global logger, e.g. SerialProgramsCommandLine's
log file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntroller is ready

Commands used to log "Controller is not ready." and silently do nothing, so a
caller couldn't tell that its input was dropped. Throw
InvalidConnectionStateException with the connection status instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
current_status() returned ControllerConnection::status_text(), which is
formatted for the GUI: each line wrapped in <font color=...> tags, lines
joined with <br>.

Add ControllerConnection::raw_status_text(), which keeps the text of each
status line as it was set (without colors) and joins the lines with a newline,
and use it in current_status().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Gin890
Gin890 merged commit 2a87fda into main Oct 8, 2026
14 checks passed
@Gin890
Gin890 deleted the improve-pybind-controller branch October 8, 2026 06:01
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