brightness: user-cyclable level persisted to NVS, via idle
idle owns the panel brightness (it fades between a "full" level and 0), so
user brightness control routes through a new idle_set_awake_brightness():
idle now fades to a runtime awake level instead of the hard-coded
DISPLAY_DEFAULT_BRIGHTNESS, and the chosen level survives idle fades + wake.
brightness.{h,cpp} holds a 4-step ramp {64,128,200,255} (default 200 == the
old constant, so default behavior is unchanged) persisted to NVS, and applies
the level through idle. Wired to the PWR button in the next commit.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
98a513a403
commit
ddb812ab5d
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
// User-controlled display brightness, persisted to NVS. The middle (PWR)
|
||||
// button short-press cycles through the levels via brightness_cycle().
|
||||
// idle owns the actual panel brightness, so this routes the chosen level
|
||||
// through idle_set_awake_brightness().
|
||||
void brightness_init(void); // load saved level from NVS and apply
|
||||
void brightness_cycle(void); // advance to next level, save, apply
|
||||
uint8_t brightness_get(void); // current PWM level (0..255)
|
||||
Reference in New Issue
Block a user