4 brightness levels instead of 16

This commit is contained in:
hueso
2026-02-17 02:41:37 -03:00
parent b66cab7029
commit 2bc8143045
2 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ static void badge_event(struct screen_event event) {
}
} else if (event.type == SE_BUTTON_PRESS) {
if (event.data == 0) {
display_brightness = (display_brightness + 1) % 16;
display_brightness = (display_brightness + 1) % 4;
} else if (event.data == 1) {
if (flash_header_valid) {
image_index++;
@@ -40,7 +40,7 @@ static void badge_event(struct screen_event event) {
}
} else if (event.type == SE_BUTTON_HOLD) {
if (event.data == 0) {
display_brightness = (display_brightness + 15) % 16;
display_brightness = (display_brightness + 3) % 4;
screen_push(&menu_screen);
}
}

View File

@@ -160,7 +160,7 @@ void TMR0_IRQHandler(void)
}
}
if (cur_bness > display_brightness) {
if ( cur_bness+2 > 1 << 1 << display_brightness ) { // sorry I don't know how to make this nicer
display_commit(&blank);
} else {
display_commit(display_screen_render + cur_index);