Skip to content

Add TX16S UI harness#7337

Open
onliner10 wants to merge 1 commit into
EdgeTX:mainfrom
onliner10:codex-tx16s-ui-harness
Open

Add TX16S UI harness#7337
onliner10 wants to merge 1 commit into
EdgeTX:mainfrom
onliner10:codex-tx16s-ui-harness

Conversation

@onliner10
Copy link
Copy Markdown

@onliner10 onliner10 commented May 1, 2026

Fixes: N/A

Summary of Changes

This adds a repeatable TX16S UI automation harness for simulator-driven UI work.

The goal is to make future color LCD/touch UI changes easier to review, easier to automate, and safer to regression-test before touching production UI code.

Why This Is Being Added

EdgeTX UI work currently depends heavily on manually launching the simulator, navigating screens by hand, and capturing host-window screenshots. That makes visual regression checks hard to repeat and easy to skew by local window scale, focus, or setup state.

This harness provides a small, opt-in control plane around the existing simulator so contributors can build, navigate, and capture framebuffer screenshots in a reproducible way.

It also makes EdgeTX much easier to work on with AI coding agents. The simulator can be exposed as an MCP server, so an agent can start a TX16S simulator session, press keys, rotate, tap, wait, capture screenshots, and inspect UI state without relying on manual host-window interaction. That should make UI work more reviewable and less speculative.

This is intended as groundwork for future TX16S-class color touchscreen UI improvements. It does not redesign the UI and does not change model storage, EEPROM format, Lua APIs, or normal simulator behavior.

What Changed

  • Adds --automation-stdio to the SDL simulator as an opt-in automation mode.
  • Exposes simple simulator commands for status, key press, long press, rotary, touch, wait, screenshot, and stop.
  • Captures screenshots from the simulator framebuffer through simuLcdCopy, avoiding host-window screenshots.
  • Adds tools/ui-harness/edgetx-ui CLI for build, smoke, and JSON flow execution.
  • Adds tools/ui-harness/edgetx-mcp as a stdio MCP wrapper using the same Python core as the CLI.
  • Adds a TX16S smoke flow that captures home, menu, and return-home screenshots.
  • Adds minimal TX16S settings fixtures for deterministic simulator startup.
  • Adds uv project metadata so contributors can run the harness with a known Python dependency set.
  • Adds EDGE_TX_BUILD_TESTS so this harness build path can avoid fetching/building native tests when they are not needed.

Contribution / Review Notes

  • This PR is a tooling contribution intended to make simulator UI testing repeatable.
  • The simulator automation mode is opt-in and only active when --automation-stdio is passed.
  • Normal SDL simulator usage should remain unchanged.
  • Native tests still default to enabled. The new EDGE_TX_BUILD_TESTS option only disables them when explicitly set to OFF.
  • The first target is TX16S (PCB=X10, PCBREV=TX16S), but the harness is structured so more color LCD/touch targets can be added later.

Verification

uv run tools/ui-harness/edgetx-ui build tx16s
uv run tools/ui-harness/edgetx-ui run-flow tools/ui-harness/flows/tx16s-smoke.json
uv run python -m compileall tools/ui-harness/edgetx_ui

The smoke flow produced three valid 480x272 PNG screenshots from the simulator framebuffer:

  • home
  • menu
  • return-home

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