mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
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:
@@ -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;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user