feat: add McpScreen phase 2 display tools
Main / Build (Brainfuck) (push) Has been cancelled
Main / Build (Breakout) (push) Has been cancelled
Main / Build (Calculator) (push) Has been cancelled
Main / Build (Diceware) (push) Has been cancelled
Main / Build (EpubReader) (push) Has been cancelled
Main / Build (GPIO) (push) Has been cancelled
Main / Build (GraphicsDemo) (push) Has been cancelled
Main / Build (HelloWorld) (push) Has been cancelled
Main / Build (M5UnitTest) (push) Has been cancelled
Main / Build (Magic8Ball) (push) Has been cancelled
Main / Build (MediaKeys) (push) Has been cancelled
Main / Build (MystifyDemo) (push) Has been cancelled
Main / Build (SerialConsole) (push) Has been cancelled
Main / Build (Snake) (push) Has been cancelled
Main / Build (TamaTac) (push) Has been cancelled
Main / Build (TodoList) (push) Has been cancelled
Main / Build (TwoEleven) (push) Has been cancelled
Main / Bundle (push) Has been cancelled

This commit is contained in:
Adolfo Reyna
2026-06-25 12:43:08 -04:00
parent ac9d6dc0d3
commit 0fb3c22f79
7 changed files with 928 additions and 83 deletions
+12 -9
View File
@@ -64,9 +64,12 @@ Pending verification:
Tactility unloads external-app ELF memory immediately after `onDestroy`
returns. An app task blocked in `accept()` therefore cannot be allowed to
survive destruction. The HTTP listener is non-blocking, client reads have
short timeouts, and `onDestroy` closes sockets, waits for the worker to signal
exit, then deletes the suspended worker task before returning.
survive destruction. The HTTP listener is non-blocking and client reads have
short timeouts. `onHide` only clears the run flag and returns immediately so
it does not block Tactility's GUI lifecycle or close an lwIP descriptor from
the wrong task. The worker owns the socket shutdown, then suspends itself
asynchronously. The next `onShow` reaps it before starting a new worker, while
`onDestroy` waits for and deletes it before returning.
## Design principles
@@ -124,20 +127,20 @@ implementation is easier to validate.
- `onCreate`
- Allocate application state.
- Start UDP discovery and HTTP MCP service tasks.
- `onShow`
- Build the dashboard and MCP-controlled display canvas.
- Attach the current UI objects to the shared application state.
- Start the HTTP MCP service.
- `onHide`
- Signal the HTTP MCP service to stop without blocking the GUI lifecycle.
- Detach and invalidate UI object pointers.
- Keep network services running while the application is merely hidden, if
Tactility preserves the app instance.
- `onDestroy`
- Stop tasks and sockets.
- Join/delete any remaining worker and close sockets as a safety fallback.
- Release buffers, devices, and application state.
The first implementation slice must explicitly verify whether Tactility keeps
the app process and `onCreate` state alive while another app is visible.
The MCP server is deliberately foreground-only. Tactility does not need to
keep the listener or display-control task active while another app owns the
screen.
### FreeRTOS responsibilities