feat(display): night-dim backlight window for screensaver
- DisplaySettings: nightDimEnabled/startHour/endHour/duty (default 22:00-07:00 at duty 20), persisted in display.properties - Display settings page: Night dim switch + Dim from/until hour dropdowns + Dim brightness slider - DisplayIdle: screensaver runs at the dimmed level when the local hour is inside the window (wrap-around aware); falls back to the regular duty when time is unknown (year < 2025)
This commit is contained in:
@@ -37,6 +37,14 @@ struct DisplaySettings {
|
||||
bool backlightTimeoutEnabled;
|
||||
uint32_t backlightTimeoutMs; // 0 = Never
|
||||
ScreensaverType screensaverType = ScreensaverType::BouncingBalls;
|
||||
// Night dim: when enabled and the local hour falls inside
|
||||
// [nightDimStartHour, nightDimEndHour), the screensaver runs at
|
||||
// nightDimDuty instead of backlightDuty. A start == end window
|
||||
// means the whole day.
|
||||
bool nightDimEnabled = false;
|
||||
uint8_t nightDimStartHour = 22;
|
||||
uint8_t nightDimEndHour = 7;
|
||||
uint8_t nightDimDuty = 20;
|
||||
};
|
||||
|
||||
/** Compares default settings with the function parameter to return the difference */
|
||||
|
||||
Reference in New Issue
Block a user