feat: flashlight - the whole screen white at full brightness

L2: a Flashlight app on Home (a lightbulb icon added to the fonts): a
white layer over everything, the backlight at 100 %, no auto-off; a tap,
the side or the top button puts it away and the brightness back.
L1: Tools > System > Flashlight, the whole OLED lit at full contrast
until a key. Not on e-ink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-10-14 22:55:01 +02:00
co-authored by Claude Opus 5.5
parent 06a188d572
commit e5a55c3b1f
15 changed files with 304 additions and 137 deletions
@@ -0,0 +1,26 @@
#pragma once
// Tools › Flashlight: the whole panel lit at full brightness, kept on (no
// auto-off) until a key. Not on e-ink, which gives no light. Leaving it, by
// a key or anything that changes the screen, puts the brightness back
// (UITask::setCurrScreen).
// Included by UITask.cpp.
class FlashlightScreen : public UIScreen {
UITask* _task;
public:
FlashlightScreen(UITask* task) : _task(task) {}
int render(DisplayDriver& display) override {
display.setBrightness(4);
display.setColor(DisplayDriver::LIGHT);
display.fillRect(0, 0, display.width(), display.height());
return 1000;
}
bool handleInput(char c) override {
(void)c;
_task->leaveTool();
return true;
}
};