4 brightness levels instead of 16
This commit is contained in:
@@ -29,7 +29,7 @@ static void badge_event(struct screen_event event) {
|
|||||||
}
|
}
|
||||||
} else if (event.type == SE_BUTTON_PRESS) {
|
} else if (event.type == SE_BUTTON_PRESS) {
|
||||||
if (event.data == 0) {
|
if (event.data == 0) {
|
||||||
display_brightness = (display_brightness + 1) % 16;
|
display_brightness = (display_brightness + 1) % 4;
|
||||||
} else if (event.data == 1) {
|
} else if (event.data == 1) {
|
||||||
if (flash_header_valid) {
|
if (flash_header_valid) {
|
||||||
image_index++;
|
image_index++;
|
||||||
@@ -40,7 +40,7 @@ static void badge_event(struct screen_event event) {
|
|||||||
}
|
}
|
||||||
} else if (event.type == SE_BUTTON_HOLD) {
|
} else if (event.type == SE_BUTTON_HOLD) {
|
||||||
if (event.data == 0) {
|
if (event.data == 0) {
|
||||||
display_brightness = (display_brightness + 15) % 16;
|
display_brightness = (display_brightness + 3) % 4;
|
||||||
screen_push(&menu_screen);
|
screen_push(&menu_screen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
display_commit(&blank);
|
||||||
} else {
|
} else {
|
||||||
display_commit(display_screen_render + cur_index);
|
display_commit(display_screen_render + cur_index);
|
||||||
|
|||||||
Reference in New Issue
Block a user