mirror of
https://github.com/ratspeak/ratdeck.git
synced 2026-10-23 09:42:23 +00:00
ratdeck: lvgl redesign, async transport, hardened storage
This commit is contained in:
1 parent
19c589583d
commit
4402c010e9
69 files changed
+4904
-1417
No files matched your search
+5
-2
@@ -80,8 +80,11 @@ void Power::setBrightness(uint8_t percent) {
|
||||
}
|
||||
|
||||
void Power::setKbBrightness(uint8_t percent, bool apply) {
|
||||
keyboard.setBacklightBrightness(constrain(percent, 1, 100));
|
||||
if (apply) { // Show the new brightness
|
||||
percent = constrain(percent, 0, 100);
|
||||
keyboard.setBacklightBrightness(percent);
|
||||
if (percent == 0) {
|
||||
keyboard.backlightOff();
|
||||
} else if (apply) { // Show the new brightness
|
||||
keyboard.backlightOn();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user