Merge pull request #32 from drkhsh/feat/power-management

Power: manual screen-off + pocket-carry input gating
This commit is contained in:
dude.eth
2026-04-25 21:17:13 -06:00
committed by GitHub
5 changed files with 42 additions and 8 deletions
+5 -2
View File
@@ -456,6 +456,7 @@ void setup() {
// Step 10: Input manager
inputManager.begin(&keyboard, &trackball, &touch);
inputManager.setPowerMgr(&powerMgr);
// Step 10.5: LVGL input drivers
LvInput::init(&keyboard, &trackball, &touch);
@@ -956,9 +957,11 @@ void loop() {
powerMgr.weakActivity(); // Trackball: wake from dim only
}
// 2. Long-press dispatch
// 2. Long-press dispatch — screen blanking is the default if no screen consumes it
if (inputManager.hadLongPress()) {
ui.handleLongPress();
if (!ui.handleLongPress()) {
powerMgr.forceScreenOff();
}
}
// 3. Key event dispatch