feat: integrate MCP server and screen override into system firmware
- Add McpSettings (load/save mcpEnabled, mcpOverrideEnabled to /data/service/mcp/settings.properties) - Add McpSystem: global state, canvas drawing (RGB565, BMP, PBM, text), I2S audio (WAV, MP3 via minimp3, tone, record) - Add McpHandler: unauthenticated POST /api/mcp (JSON-RPC 2.0, 13 tools) and POST /api/screen/raw endpoints - Route MCP endpoints before Basic Auth check in WebServerService::handleApiPost - Start HTTP server at boot if either webServerEnabled OR mcpEnabled is set - Fix setEnabled: start unconditionally when called with true; only stop if both WS and MCP are disabled - Add McpSettingsApp (Settings category): toggle MCP service + screen override, show live endpoint URL - Add McpOverrideApp (appId one.tactility.mcpscreen): full-screen LVGL canvas for LLM-driven display override - Register both new apps in Tactility.cpp
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
namespace tt::settings::mcp {
|
||||
|
||||
struct McpSettings {
|
||||
bool mcpEnabled = false; // Enable MCP server endpoints on system web server
|
||||
bool mcpOverrideEnabled = true; // Automatically switch to override screen on drawing commands
|
||||
};
|
||||
|
||||
bool load(McpSettings& settings);
|
||||
McpSettings getDefault();
|
||||
McpSettings loadOrGetDefault();
|
||||
bool save(const McpSettings& settings);
|
||||
|
||||
} // namespace tt::settings::mcp
|
||||
Reference in New Issue
Block a user