feat(mcp): restore MCP service with display charging toggle

- Restore MCP system (McpSystem 1900+ LOC, McpHandler, McpScreensaver, McpSettings, McpOverride apps)
- Use audio-stream instead of direct I2S for MP3 playback (fixes fast playback, uses native resampler)
- Register McpSettings + McpOverride in Tactility.cpp so Settings shows MCP Screen
- DisplaySettings: add ScreensaverType::McpScreen and disableScreensaverWhenCharging flag
- Display app: add 'Disable on charging' toggle, handles McpScreen screensaver type
- DisplayIdle: skip screensaver while charging, support McpScreen screensaver, isDeviceCharging check via PowerDevice
- WebServer: coexistence with MCP (McpHandler)
- Avoid formatting churn from previous commits

Squashed from range eaa248b0..8970143f (6 commits) into single clean commit
This commit is contained in:
Adolfo Reyna
2026-07-21 11:47:38 -04:00
parent 2fbc44466a
commit a158fe1696
18 changed files with 5646 additions and 17 deletions
@@ -18,6 +18,7 @@ enum class ScreensaverType {
Mystify,
MatrixRain,
StackChan,
McpScreen,
Count // Sentinel for bounds checking - must be last
};
@@ -28,6 +29,7 @@ struct DisplaySettings {
bool backlightTimeoutEnabled;
uint32_t backlightTimeoutMs; // 0 = Never
ScreensaverType screensaverType = ScreensaverType::BouncingBalls;
bool disableScreensaverWhenCharging = false;
};
/** Compares default settings with the function parameter to return the difference */
@@ -0,0 +1,14 @@
#pragma once
namespace tt::settings::mcp {
struct McpSettings {
bool mcpEnabled = false; // Enable MCP server endpoints on system web server
};
bool load(McpSettings& settings);
McpSettings getDefault();
McpSettings loadOrGetDefault();
bool save(const McpSettings& settings);
} // namespace tt::settings::mcp