Skip to content

Commit c1431f4

Browse files
authored
Disable low brightness, as this soft-bricks at least the L1 (#7223)
1 parent 93132fa commit c1431f4

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/graphics/draw/MenuHandler.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -602,32 +602,28 @@ void menuHandler::BuzzerModeMenu()
602602

603603
void menuHandler::BrightnessPickerMenu()
604604
{
605-
static const char *optionsArray[] = {"Back", "Low", "Medium", "High", "Very High"};
605+
static const char *optionsArray[] = {"Back", "Low", "Medium", "High"};
606606

607607
// Get current brightness level to set initial selection
608-
int currentSelection = 1; // Default to Low
608+
int currentSelection = 1; // Default to Medium
609609
if (uiconfig.screen_brightness >= 255) {
610-
currentSelection = 4; // Very High
610+
currentSelection = 3; // Very High
611611
} else if (uiconfig.screen_brightness >= 128) {
612-
currentSelection = 3; // High
613-
} else if (uiconfig.screen_brightness >= 64) {
614-
currentSelection = 2; // Medium
612+
currentSelection = 2; // High
615613
} else {
616-
currentSelection = 1; // Low
614+
currentSelection = 1; // Medium
617615
}
618616

619617
BannerOverlayOptions bannerOptions;
620618
bannerOptions.message = "Brightness";
621619
bannerOptions.optionsArrayPtr = optionsArray;
622-
bannerOptions.optionsCount = 5;
620+
bannerOptions.optionsCount = 4;
623621
bannerOptions.bannerCallback = [](int selected) -> void {
624-
if (selected == 1) { // Low
625-
uiconfig.screen_brightness = 1;
626-
} else if (selected == 2) { // Medium
622+
if (selected == 1) { // Medium
627623
uiconfig.screen_brightness = 64;
628-
} else if (selected == 3) { // High
624+
} else if (selected == 2) { // High
629625
uiconfig.screen_brightness = 128;
630-
} else if (selected == 4) { // Very High
626+
} else if (selected == 3) { // Very High
631627
uiconfig.screen_brightness = 255;
632628
}
633629

0 commit comments

Comments
 (0)