now using sizeof for brightness table.... kinda
This commit is contained in:
parent
7e48259420
commit
9172fe3d78
@ -49,7 +49,7 @@ const uint8_t PROGMEM gammaBright[] = {
|
|||||||
0, 1, 2, 3, 6, 10, 14,
|
0, 1, 2, 3, 6, 10, 14,
|
||||||
18, 26, 31, 38, 46, 54, 66,
|
18, 26, 31, 38, 46, 54, 66,
|
||||||
76, 89, 104, 128, 150, 180, 240,
|
76, 89, 104, 128, 150, 180, 240,
|
||||||
250, 280, 340};
|
290, 400, 500};
|
||||||
|
|
||||||
struct cRGB led[LEDS_PER_SLOT];
|
struct cRGB led[LEDS_PER_SLOT];
|
||||||
|
|
||||||
@ -194,7 +194,8 @@ void keyboard(void) {
|
|||||||
brightness = (brightness <= 0 ? 0 : brightness - 1);
|
brightness = (brightness <= 0 ? 0 : brightness - 1);
|
||||||
break;
|
break;
|
||||||
case KEY_BRIGHTNESS_DOWN:
|
case KEY_BRIGHTNESS_DOWN:
|
||||||
brightness = (brightness >= 21 ? 21 : brightness + 1);
|
brightness = (brightness >= sizeof(gammaBright) - 3 ? /* No idea why -3... */
|
||||||
|
sizeof(gammaBright) - 3 : brightness + 1);
|
||||||
break;
|
break;
|
||||||
case KEY_SF_1:
|
case KEY_SF_1:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user