feat(sim): export the LVGL UI tree as JSON from the WASM simulator - #7752
Open
jurgelenas wants to merge 1 commit into
Open
feat(sim): export the LVGL UI tree as JSON from the WASM simulator#7752jurgelenas wants to merge 1 commit into
jurgelenas wants to merge 1 commit into
Conversation
Add simuUiTreeRequest/Ready/Data/Size exports that serialise the live LVGL widget tree (screen, top and sys layers) to JSON so a host can inspect and drive the colour UI in automated tests. The snapshot is built on the GUI task from a hook at the end of LvglWrapper::run(), double-buffered and requested asynchronously; flags select skipping hidden subtrees and including per-node style data. Black-and-white builds keep the exports but report that no tree is available. Each node carries its LVGL class name, id (object address), absolute coordinates, visibility (display bounds plus ancestor clipping), state and flag booleans (emitted only when set) and widget-specific fields: label/textarea/checkbox text, textarea cursor, keyboard textarea and mode, btnmatrix buttons and selection, bar/arc value range, table cells and selected cell, image source and active tile. The root carries the LVGL version, tick, focused object and edit state. Add simuIsBootComplete(), latched from the GUI hook once edgeTxInit has run and the Lua interpreter is running, so hosts can wait for a responsive UI instead of sleeping. Bind both in the web host runner.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add simuUiTreeRequest/Ready/Data/Size exports that serialise the live LVGL widget tree (screen, top and sys layers) to JSON so a host can inspect and drive the colour UI in automated tests. The snapshot is built on the GUI task from a hook at the end of LvglWrapper::run(), double-buffered and requested asynchronously; flags select skipping hidden subtrees and including per-node style data. Black-and-white builds keep the exports but report that no tree is available.
Each node carries its LVGL class name, id (object address), absolute coordinates, visibility (display bounds plus ancestor clipping), state and flag booleans (emitted only when set) and widget-specific fields: label/textarea/checkbox text, textarea cursor, keyboard textarea and mode, btnmatrix buttons and selection, bar/arc value range, table cells and selected cell, image source and active tile. The root carries the LVGL version, tick, focused object and edit state.
Add simuIsBootComplete(), latched from the GUI hook once edgeTxInit has run and the Lua interpreter is running, so hosts can wait for a responsive UI instead of sleeping. Bind both in the web host runner.
Fixes #7749