perf(es3c28p): LVGL 512KB PSRAM cache + display charging toggle
- LVGL image cache 512KB + header cache 16 on PSRAM (was PNG bottleneck, c4ec7ead)
- DisplaySettings.disableScreensaverWhenCharging persisted, checked via PowerDevice::IsCharging
- Display app: 'Disable on charging' toggle under Display settings, auto-disabled when timeout off
- DisplayIdle: skip screensaver while charging, auto-stop if plugging in while dimmed
- Keeps upstream full-DTS board clean, no JPEG decoder, no BT HID combo per user
This commit is contained in:
@@ -1,44 +1,32 @@
|
||||
#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
|
||||
None,
|
||||
BouncingBalls,
|
||||
Mystify,
|
||||
MatrixRain,
|
||||
StackChan,
|
||||
Count // Sentinel for bounds checking - must be last
|
||||
Count
|
||||
};
|
||||
|
||||
struct DisplaySettings {
|
||||
Orientation orientation;
|
||||
uint8_t gammaCurve;
|
||||
uint8_t backlightDuty;
|
||||
bool backlightTimeoutEnabled;
|
||||
uint32_t backlightTimeoutMs; // 0 = Never
|
||||
uint32_t backlightTimeoutMs;
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user