Files
tactility/Tactility/Include/Tactility/settings/DisplaySettings.h
T
Adolfo Reyna a158fe1696 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
2026-07-21 11:47:38 -04:00

47 lines
1.1 KiB
C++

#pragma once
#include <src/display/lv_display.h>
namespace tt::settings::display {
enum class Orientation {
// In order of rotation (to make it easier to convert to LVGL rotation)
Landscape,
Portrait,
LandscapeFlipped,
PortraitFlipped,
};
enum class ScreensaverType {
None, // Just black screen
BouncingBalls,
Mystify,
MatrixRain,
StackChan,
McpScreen,
Count // Sentinel for bounds checking - must be last
};
struct DisplaySettings {
Orientation orientation;
uint8_t gammaCurve;
uint8_t backlightDuty;
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 */
lv_display_rotation_t toLvglDisplayRotation(Orientation orientation);
bool load(DisplaySettings& settings);
DisplaySettings loadOrGetDefault();
DisplaySettings getDefault();
bool save(const DisplaySettings& settings);
} // namespace