feat(simu): add opt-in Widget Studio automation hooks - #7646
Conversation
|
CI status note: all documentation, test, and firmware-build jobs passed. @philmoz, could you provide early feedback on the opt-in option name, command protocol, and simulator-only Lua API while this remains a draft? If appropriate, could a maintainer also rerun the failed packaging job? |
|
This looks like some overlap with #7337 at first glance? The build error seems to be a network outage issue, will probably resolve on the next commit. |
|
Thanks, @pfeerick. I agree that the overlap with #7337 is substantial and should be resolved before this draft grows further. I opened #7668 as a collaborative consolidation draft. It uses #7337 as the generic harness foundation, carries forward the Windows, reset/reload, state-injection, and render-complete capture requirements explored here, and explicitly removes the duplicate or Widget Studio-specific surfaces. I am not closing this PR yet. The new draft starts with the full contract, keep/drop matrix, phased implementation plan, tests, attribution policy, and rollback so @onliner10 and the simulator maintainers can shape the direction before implementation. The packaging failure is secondary until that direction is agreed. |
Add bounded status and describe responses backed by the simulator session state, then validate discovery and poll first-frame readiness from the cross-platform host session. This consolidates the host lifecycle and discovery direction from EdgeTX#7337 with the guarded epoch and first-frame state model from EdgeTX#7646. Credit to @onliner10 and @pfeerick for the two approaches brought together here.
Implement Phase 4 of the consolidated simulator automation plan: target-filtered key, rotary, and touch primitives; an asynchronous real-LCD frame barrier; host-side timed composites; release cleanup; and focused native/Python coverage. This combines the portable host-side composition direction from EdgeTX#7337 with the direct simulator helpers and explicit touch transitions explored in EdgeTX#7646. Thanks to Mateusz Urban (@onliner10) for the original harness direction; review remains explicitly invited in EdgeTX#7668.
Capture a strictly newer RGB565 framebuffer after an LVGL invalidation, publish deterministic PPM artifacts without replacement, and convert them to verified PNG metadata in the host client. This combines the portable PPM and client direction from EdgeTX#7337 with the static-screen invalidation approach from EdgeTX#7646. Thanks to @onliner10 for the original harness and capture direction.
Summary of changes:
Adds an experimental, opt-in
WIDGET_STUDIOmode to the native color-LCD simulator so visual Lua/LVGL tooling can drive the real EdgeTX runtime instead of maintaining a parallel renderer.The option defaults to
OFFand does not affect radio firmware, Companion embedding, or WASM builds.What is included:
--pipe <path>command-file interface for key, touch, capture, reset, reload, and exit commandssimutable for named switch/analog input control, SD-mapped capture, and asynchronous resetImplementation notes:
WIDGET_STUDIOis defined only for the seven sources that implement the hooks.simuexecutable, avoiding duplicate stb symbols ingtests-radioand excluding it from WASM.--pipeare intentionally treated as trusted local-development input. Lua capture paths are resolved through the configured SD-card mapping.Validation performed on Windows with Ninja/MinGW,
PCB=TX16SMK3, and Companion disabled:WIDGET_STUDIO=OFFsimubuild passed;--helpdoes not expose--pipeWIDGET_STUDIO=ONsimubuild passed;--helpexposes--pipeWIDGET_STUDIOexit(code 0)gtests-radiosource objects compiled; the final local Windows link is blocked by the existing unconditional-fsanitize=addresstest flag because this MinGW installation has nolibasanThis is intentionally a draft for maintainer feedback on the option/API shape and naming before treating it as a stable development interface.
This PR is independent of the Gauge Pro SD-card contribution (EdgeTX/edgetx-sdcard#289); the widgets do not depend on these hooks, although the hooks were used to exercise their visual catalog locally.