diff options
| author | XScorpion2 <rcalt2vt@gmail.com> | 2019-04-30 00:18:50 +0200 |
|---|---|---|
| committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-04-29 15:18:50 -0700 |
| commit | a7113c8ed090d0ac647f30ee9b8ef41252e568ed (patch) | |
| tree | 24d33db679b4d1357efef2784e69fea48e98d0ed | |
| parent | 1d784f0f9575b70e35c9c8338b0ff80dc7316d7e (diff) | |
| download | qmk_firmware-a7113c8ed090d0ac647f30ee9b8ef41252e568ed.tar.gz qmk_firmware-a7113c8ed090d0ac647f30ee9b8ef41252e568ed.zip | |
Updated rgb_led struct field modifier to flags (#5619)
Updated effects to test led flags
Updated massdrop to use new flags field for led toggle
57 files changed, 1173 insertions, 1028 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 4ce9d15f0..91ec77ace 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
| @@ -127,13 +127,13 @@ Configure the hardware via your `config.h`: | |||
| 127 | From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example: | 127 | From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example: |
| 128 | 128 | ||
| 129 | ```C | 129 | ```C |
| 130 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 130 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 131 | /* {row | col << 4} | 131 | /* {row | col << 4} |
| 132 | * | {x=0..224, y=0..64} | 132 | * | {x=0..224, y=0..64} |
| 133 | * | | modifier | 133 | * | | flags |
| 134 | * | | | */ | 134 | * | | | */ |
| 135 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, | 135 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, |
| 136 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, | 136 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 4}, |
| 137 | .... | 137 | .... |
| 138 | } | 138 | } |
| 139 | ``` | 139 | ``` |
| @@ -147,7 +147,19 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION | |||
| 147 | 147 | ||
| 148 | Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. | 148 | Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. |
| 149 | 149 | ||
| 150 | `modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). | 150 | `flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type. |
| 151 | |||
| 152 | ## Flags | ||
| 153 | |||
| 154 | |Define |Description | | ||
| 155 | |------------------------------------|-------------------------------------------| | ||
| 156 | |`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.| | ||
| 157 | |`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.| | ||
| 158 | |`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. | | ||
| 159 | |`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. | | ||
| 160 | |`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. | | ||
| 161 | |`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. | | ||
| 162 | |`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. | | ||
| 151 | 163 | ||
| 152 | ## Keycodes | 164 | ## Keycodes |
| 153 | 165 | ||
diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c index 9baed223b..45c185549 100644 --- a/keyboards/boston_meetup/2019/2019.c +++ b/keyboards/boston_meetup/2019/2019.c | |||
| @@ -21,17 +21,17 @@ | |||
| 21 | #ifdef RGB_MATRIX_ENABLE | 21 | #ifdef RGB_MATRIX_ENABLE |
| 22 | #include "rgblight.h" | 22 | #include "rgblight.h" |
| 23 | 23 | ||
| 24 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 24 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 25 | /*{row | col << 4} | 25 | /*{row | col << 4} |
| 26 | | {x=0..224, y=0..64} | 26 | | {x=0..224, y=0..64} |
| 27 | | | modifier | 27 | | | modifier |
| 28 | | | | */ | 28 | | | | */ |
| 29 | {{1|(3<<4)}, {188, 16}, 0}, | 29 | {{1|(3<<4)}, {188, 16}, 4}, |
| 30 | {{3|(3<<4)}, {187, 48}, 0}, | 30 | {{3|(3<<4)}, {187, 48}, 4}, |
| 31 | {{4|(2<<4)}, {149, 64}, 0}, | 31 | {{4|(2<<4)}, {149, 64}, 4}, |
| 32 | {{4|(1<<4)}, {112, 64}, 0}, | 32 | {{4|(1<<4)}, {112, 64}, 4}, |
| 33 | {{3|(0<<4)}, {37, 48}, 0}, | 33 | {{3|(0<<4)}, {37, 48}, 4}, |
| 34 | {{1|(0<<4)}, {38, 16}, 0} | 34 | {{1|(0<<4)}, {38, 16}, 4} |
| 35 | }; | 35 | }; |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c index 0104adf15..2345028d2 100644 --- a/keyboards/crkbd/rev1/rev1.c +++ b/keyboards/crkbd/rev1/rev1.c | |||
| @@ -56,70 +56,70 @@ void led_set_kb(uint8_t usb_led) { | |||
| 56 | * | | | modifier | 56 | * | | | modifier |
| 57 | * | | | */ | 57 | * | | | */ |
| 58 | #define RGB_MATRIX_LEFT_LEDS \ | 58 | #define RGB_MATRIX_LEFT_LEDS \ |
| 59 | { { 0xFF }, { 85, 16 }, 0 }, /* 1 */ \ | 59 | { { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \ |
| 60 | { { 0xFF }, { 50, 13 }, 0 }, /* 2 */ \ | 60 | { { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \ |
| 61 | { { 0xFF }, { 16, 20 }, 0 }, /* 3 */ \ | 61 | { { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \ |
| 62 | { { 0xFF }, { 16, 38 }, 0 }, /* 4 */ \ | 62 | { { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \ |
| 63 | { { 0xFF }, { 50, 48 }, 0 }, /* 5 */ \ | 63 | { { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \ |
| 64 | { { 0xFF }, { 85, 52 }, 0 }, /* 6 */ \ | 64 | { { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \ |
| 65 | { { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \ | 65 | { { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \ |
| 66 | { { 2 | ( 5 << 4 ) }, { 85, 39 }, 0 }, /* 8 */ \ | 66 | { { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \ |
| 67 | { { 1 | ( 5 << 4 ) }, { 85, 21 }, 0 }, /* 9 */ \ | 67 | { { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \ |
| 68 | { { 0 | ( 5 << 4 ) }, { 85, 4 }, 0 }, /* 10 */ \ | 68 | { { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \ |
| 69 | { { 0 | ( 4 << 4 ) }, { 68, 02 }, 0 }, /* 11 */ \ | 69 | { { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \ |
| 70 | { { 1 | ( 4 << 4 ) }, { 68, 19 }, 0 }, /* 12 */ \ | 70 | { { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \ |
| 71 | { { 2 | ( 4 << 4 ) }, { 68, 37 }, 0 }, /* 13 */ \ | 71 | { { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \ |
| 72 | { { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \ | 72 | { { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \ |
| 73 | { { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \ | 73 | { { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \ |
| 74 | { { 2 | ( 3 << 4 ) }, { 50, 35 }, 0 }, /* 16 */ \ | 74 | { { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \ |
| 75 | { { 1 | ( 3 << 4 ) }, { 50, 13 }, 0 }, /* 17 */ \ | 75 | { { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \ |
| 76 | { { 0 | ( 3 << 4 ) }, { 50, 0 }, 0 }, /* 18 */ \ | 76 | { { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \ |
| 77 | { { 0 | ( 2 << 4 ) }, { 33, 3 }, 0 }, /* 19 */ \ | 77 | { { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \ |
| 78 | { { 1 | ( 2 << 4 ) }, { 33, 20 }, 0 }, /* 20 */ \ | 78 | { { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \ |
| 79 | { { 2 | ( 2 << 4 ) }, { 33, 37 }, 0 }, /* 21 */ \ | 79 | { { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \ |
| 80 | { { 2 | ( 1 << 4 ) }, { 16, 42 }, 0 }, /* 22 */ \ | 80 | { { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \ |
| 81 | { { 1 | ( 1 << 4 ) }, { 16, 24 }, 0 }, /* 23 */ \ | 81 | { { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \ |
| 82 | { { 0 | ( 1 << 4 ) }, { 16, 7 }, 0 }, /* 24 */ \ | 82 | { { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \ |
| 83 | { { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \ | 83 | { { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \ |
| 84 | { { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \ | 84 | { { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \ |
| 85 | { { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */ | 85 | { { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */ |
| 86 | 86 | ||
| 87 | #define RGB_MATRIX_RIGHT_LEDS \ | 87 | #define RGB_MATRIX_RIGHT_LEDS \ |
| 88 | { { 0xFF }, { 139, 16 }, 0 }, /* 1 */ \ | 88 | { { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \ |
| 89 | { { 0xFF }, { 174, 13 }, 0 }, /* 2 */ \ | 89 | { { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \ |
| 90 | { { 0xFF }, { 208, 20 }, 0 }, /* 3 */ \ | 90 | { { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \ |
| 91 | { { 0xFF }, { 208, 38 }, 0 }, /* 4 */ \ | 91 | { { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \ |
| 92 | { { 0xFF }, { 174, 48 }, 0 }, /* 5 */ \ | 92 | { { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \ |
| 93 | { { 0xFF }, { 139, 52 }, 0 }, /* 6 */ \ | 93 | { { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \ |
| 94 | { { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \ | 94 | { { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \ |
| 95 | { { 6 | ( 5 << 4 ) }, { 139, 39 }, 0 }, /* 8 */ \ | 95 | { { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \ |
| 96 | { { 5 | ( 5 << 4 ) }, { 139, 21 }, 0 }, /* 9 */ \ | 96 | { { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \ |
| 97 | { { 4 | ( 5 << 4 ) }, { 139, 4 }, 0 }, /* 10 */ \ | 97 | { { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \ |
| 98 | { { 4 | ( 4 << 4 ) }, { 156, 02 }, 0 }, /* 11 */ \ | 98 | { { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \ |
| 99 | { { 5 | ( 4 << 4 ) }, { 156, 19 }, 0 }, /* 12 */ \ | 99 | { { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \ |
| 100 | { { 6 | ( 4 << 4 ) }, { 156, 37 }, 0 }, /* 13 */ \ | 100 | { { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \ |
| 101 | { { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \ | 101 | { { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \ |
| 102 | { { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \ | 102 | { { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \ |
| 103 | { { 6 | ( 3 << 4 ) }, { 174, 35 }, 0 }, /* 16 */ \ | 103 | { { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \ |
| 104 | { { 5 | ( 3 << 4 ) }, { 174, 13 }, 0 }, /* 17 */ \ | 104 | { { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \ |
| 105 | { { 4 | ( 3 << 4 ) }, { 174, 0 }, 0 }, /* 18 */ \ | 105 | { { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \ |
| 106 | { { 4 | ( 2 << 4 ) }, { 191, 3 }, 0 }, /* 19 */ \ | 106 | { { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \ |
| 107 | { { 5 | ( 2 << 4 ) }, { 191, 20 }, 0 }, /* 20 */ \ | 107 | { { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \ |
| 108 | { { 6 | ( 2 << 4 ) }, { 191, 37 }, 0 }, /* 21 */ \ | 108 | { { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \ |
| 109 | { { 6 | ( 1 << 4 ) }, { 208, 42 }, 0 }, /* 22 */ \ | 109 | { { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \ |
| 110 | { { 5 | ( 1 << 4 ) }, { 208, 24 }, 0 }, /* 23 */ \ | 110 | { { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \ |
| 111 | { { 4 | ( 1 << 4 ) }, { 208, 7 }, 0 }, /* 24 */ \ | 111 | { { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \ |
| 112 | { { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \ | 112 | { { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \ |
| 113 | { { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \ | 113 | { { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \ |
| 114 | { { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */ | 114 | { { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */ |
| 115 | 115 | ||
| 116 | #ifdef RGB_MATRIX_SPLIT_RIGHT | 116 | #ifdef RGB_MATRIX_SPLIT_RIGHT |
| 117 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 117 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 118 | RGB_MATRIX_RIGHT_LEDS | 118 | RGB_MATRIX_RIGHT_LEDS |
| 119 | RGB_MATRIX_LEFT_LEDS | 119 | RGB_MATRIX_LEFT_LEDS |
| 120 | }; | 120 | }; |
| 121 | #else | 121 | #else |
| 122 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 122 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 123 | RGB_MATRIX_LEFT_LEDS | 123 | RGB_MATRIX_LEFT_LEDS |
| 124 | RGB_MATRIX_RIGHT_LEDS | 124 | RGB_MATRIX_RIGHT_LEDS |
| 125 | }; | 125 | }; |
diff --git a/keyboards/doro67/rgb/rgb.c b/keyboards/doro67/rgb/rgb.c index 6f39e00c6..8aaf6ef4a 100644 --- a/keyboards/doro67/rgb/rgb.c +++ b/keyboards/doro67/rgb/rgb.c | |||
| @@ -52,73 +52,73 @@ void led_set_kb(uint8_t usb_led) { | |||
| 52 | led_set_user(usb_led); | 52 | led_set_user(usb_led); |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 55 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 56 | {{0|(0<<4)}, {15*0, 0}, 0}, // Esc | 56 | {{0|(0<<4)}, {15*0, 0}, 4}, // Esc |
| 57 | {{0|(1<<4)}, {15*1, 0}, 0}, // 1 | 57 | {{0|(1<<4)}, {15*1, 0}, 4}, // 1 |
| 58 | {{0|(2<<4)}, {15*2, 0}, 0}, // 2 | 58 | {{0|(2<<4)}, {15*2, 0}, 4}, // 2 |
| 59 | {{0|(3<<4)}, {15*3, 0}, 0}, // 3 | 59 | {{0|(3<<4)}, {15*3, 0}, 4}, // 3 |
| 60 | {{0|(4<<4)}, {15*4, 0}, 0}, // 4 | 60 | {{0|(4<<4)}, {15*4, 0}, 4}, // 4 |
| 61 | {{0|(5<<4)}, {15*5, 0}, 0}, // 5 | 61 | {{0|(5<<4)}, {15*5, 0}, 4}, // 5 |
| 62 | {{0|(6<<4)}, {15*6, 0}, 0}, // 6 | 62 | {{0|(6<<4)}, {15*6, 0}, 4}, // 6 |
| 63 | {{0|(7<<4)}, {15*7, 0}, 0}, // 7 | 63 | {{0|(7<<4)}, {15*7, 0}, 4}, // 7 |
| 64 | {{0|(8<<4)}, {15*8, 0}, 0}, // 8 | 64 | {{0|(8<<4)}, {15*8, 0}, 4}, // 8 |
| 65 | {{0|(9<<4)}, {15*9, 0}, 0}, // 9 | 65 | {{0|(9<<4)}, {15*9, 0}, 4}, // 9 |
| 66 | {{0|(10<<4)}, {15*10, 0}, 0}, // 0 | 66 | {{0|(10<<4)}, {15*10, 0}, 4}, // 0 |
| 67 | {{0|(11<<4)}, {15*11, 0}, 0}, // - | 67 | {{0|(11<<4)}, {15*11, 0}, 4}, // - |
| 68 | {{0|(12<<4)}, {15*12, 0}, 0}, // = | 68 | {{0|(12<<4)}, {15*12, 0}, 4}, // = |
| 69 | {{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace | 69 | {{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace |
| 70 | {{0|(14<<4)}, {15*15, 0}, 1}, // Ins | 70 | {{0|(14<<4)}, {15*15, 0}, 1}, // Ins |
| 71 | 71 | ||
| 72 | {{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab | 72 | {{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab |
| 73 | {{1|(1<<4)}, {15*1.5, 16}, 0}, // Q | 73 | {{1|(1<<4)}, {15*1.5, 16}, 4}, // Q |
| 74 | {{1|(2<<4)}, {15*2.5, 16}, 0}, // W | 74 | {{1|(2<<4)}, {15*2.5, 16}, 4}, // W |
| 75 | {{1|(3<<4)}, {15*3.5, 16}, 0}, // E | 75 | {{1|(3<<4)}, {15*3.5, 16}, 4}, // E |
| 76 | {{1|(4<<4)}, {15*4.5, 16}, 0}, // R | 76 | {{1|(4<<4)}, {15*4.5, 16}, 4}, // R |
| 77 | {{1|(5<<4)}, {15*5.5, 16}, 0}, // T | 77 | {{1|(5<<4)}, {15*5.5, 16}, 4}, // T |
| 78 | {{1|(6<<4)}, {15*6.5, 16}, 0}, // Y | 78 | {{1|(6<<4)}, {15*6.5, 16}, 4}, // Y |
| 79 | {{1|(7<<4)}, {15*7.5, 16}, 0}, // U | 79 | {{1|(7<<4)}, {15*7.5, 16}, 4}, // U |
| 80 | {{1|(8<<4)}, {15*8.5, 16}, 0}, // I | 80 | {{1|(8<<4)}, {15*8.5, 16}, 4}, // I |
| 81 | {{1|(9<<4)}, {15*9.5, 16}, 0}, // O | 81 | {{1|(9<<4)}, {15*9.5, 16}, 4}, // O |
| 82 | {{1|(10<<4)}, {15*10.5, 16}, 0}, // P | 82 | {{1|(10<<4)}, {15*10.5, 16}, 4}, // P |
| 83 | {{1|(11<<4)}, {15*11.5, 16}, 0}, // [ | 83 | {{1|(11<<4)}, {15*11.5, 16}, 4}, // [ |
| 84 | {{1|(12<<4)}, {15*12.5, 16}, 0}, // ] | 84 | {{1|(12<<4)}, {15*12.5, 16}, 4}, // ] |
| 85 | {{1|(13<<4)}, {15*13.75, 16}, 1}, // | 85 | {{1|(13<<4)}, {15*13.75, 16}, 1}, // |
| 86 | {{1|(14<<4)}, {15*15, 16}, 1}, // Del | 86 | {{1|(14<<4)}, {15*15, 16}, 1}, // Del |
| 87 | 87 | ||
| 88 | {{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock | 88 | {{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock |
| 89 | {{2|(1<<4)}, {15*1.75, 32}, 0}, // A | 89 | {{2|(1<<4)}, {15*1.75, 32}, 4}, // A |
| 90 | {{2|(2<<4)}, {15*2.75, 32}, 0}, // S | 90 | {{2|(2<<4)}, {15*2.75, 32}, 4}, // S |
| 91 | {{2|(3<<4)}, {15*3.75, 32}, 0}, // D | 91 | {{2|(3<<4)}, {15*3.75, 32}, 4}, // D |
| 92 | {{2|(4<<4)}, {15*4.75, 32}, 0}, // F | 92 | {{2|(4<<4)}, {15*4.75, 32}, 4}, // F |
| 93 | {{2|(5<<4)}, {15*5.75, 32}, 0}, // G | 93 | {{2|(5<<4)}, {15*5.75, 32}, 4}, // G |
| 94 | {{2|(6<<4)}, {15*6.75, 32}, 0}, // H | 94 | {{2|(6<<4)}, {15*6.75, 32}, 4}, // H |
| 95 | {{2|(7<<4)}, {15*7.75, 32}, 0}, // J | 95 | {{2|(7<<4)}, {15*7.75, 32}, 4}, // J |
| 96 | {{2|(8<<4)}, {15*8.75, 32}, 0}, // K | 96 | {{2|(8<<4)}, {15*8.75, 32}, 4}, // K |
| 97 | {{2|(9<<4)}, {15*9.75, 32}, 0}, // L | 97 | {{2|(9<<4)}, {15*9.75, 32}, 4}, // L |
| 98 | {{2|(10<<4)}, {15*10.75, 32}, 0}, // ; | 98 | {{2|(10<<4)}, {15*10.75, 32}, 4}, // ; |
| 99 | {{2|(11<<4)}, {15*11.75, 32}, 0}, // ' | 99 | {{2|(11<<4)}, {15*11.75, 32}, 4}, // ' |
| 100 | {{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter | 100 | {{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter |
| 101 | {{2|(14<<4)}, {15*15, 32}, 1}, // Pgup | 101 | {{2|(14<<4)}, {15*15, 32}, 1}, // Pgup |
| 102 | 102 | ||
| 103 | {{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift | 103 | {{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift |
| 104 | {{3|(2<<4)}, {15*2, 48}, 0}, // Z | 104 | {{3|(2<<4)}, {15*2, 48}, 4}, // Z |
| 105 | {{3|(3<<4)}, {15*3, 48}, 0}, // X | 105 | {{3|(3<<4)}, {15*3, 48}, 4}, // X |
| 106 | {{3|(4<<4)}, {15*4, 48}, 0}, // C | 106 | {{3|(4<<4)}, {15*4, 48}, 4}, // C |
| 107 | {{3|(5<<4)}, {15*5, 48}, 0}, // V | 107 | {{3|(5<<4)}, {15*5, 48}, 4}, // V |
| 108 | {{3|(6<<4)}, {15*6, 48}, 0}, // B | 108 | {{3|(6<<4)}, {15*6, 48}, 4}, // B |
| 109 | {{3|(7<<4)}, {15*7, 48}, 0}, // N | 109 | {{3|(7<<4)}, {15*7, 48}, 4}, // N |
| 110 | {{3|(8<<4)}, {15*8, 48}, 0}, // M | 110 | {{3|(8<<4)}, {15*8, 48}, 4}, // M |
| 111 | {{3|(9<<4)}, {15*9, 48}, 0}, // , | 111 | {{3|(9<<4)}, {15*9, 48}, 4}, // , |
| 112 | {{3|(10<<4)}, {15*10, 48}, 0}, // . | 112 | {{3|(10<<4)}, {15*10, 48}, 4}, // . |
| 113 | {{3|(11<<4)}, {15*11, 48}, 0}, // / | 113 | {{3|(11<<4)}, {15*11, 48}, 4}, // / |
| 114 | {{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift | 114 | {{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift |
| 115 | {{3|(13<<4)}, {15*14, 48}, 1}, // Up | 115 | {{3|(13<<4)}, {15*14, 48}, 1}, // Up |
| 116 | {{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn | 116 | {{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn |
| 117 | 117 | ||
| 118 | {{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl | 118 | {{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl |
| 119 | {{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI | 119 | {{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI |
| 120 | {{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt | 120 | {{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt |
| 121 | {{4|(3<<4)}, {15*6.75, 64}, 0}, // Space | 121 | {{4|(3<<4)}, {15*6.75, 64}, 4}, // Space |
| 122 | {{4|(9<<4)}, {15*9, 64}, 1}, // RAlt | 122 | {{4|(9<<4)}, {15*9, 64}, 1}, // RAlt |
| 123 | {{4|(10<<4)}, {15*10.25, 64}, 1}, // FN | 123 | {{4|(10<<4)}, {15*10.25, 64}, 1}, // FN |
| 124 | {{4|(12<<4)}, {15*13, 64}, 1}, // Left | 124 | {{4|(12<<4)}, {15*13, 64}, 1}, // Left |
diff --git a/keyboards/dztech/dz40rgb/dz40rgb.c b/keyboards/dztech/dz40rgb/dz40rgb.c index b1a03760f..34bfc4366 100644 --- a/keyboards/dztech/dz40rgb/dz40rgb.c +++ b/keyboards/dztech/dz40rgb/dz40rgb.c | |||
| @@ -71,7 +71,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 71 | 71 | ||
| 72 | }; | 72 | }; |
| 73 | 73 | ||
| 74 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 74 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 75 | 75 | ||
| 76 | {{0|(11<<4)}, {20.36*11, 0}, 1}, | 76 | {{0|(11<<4)}, {20.36*11, 0}, 1}, |
| 77 | {{0|(10<<4)}, {20.36*10, 0}, 1}, | 77 | {{0|(10<<4)}, {20.36*10, 0}, 1}, |
| @@ -90,32 +90,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 90 | {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, | 90 | {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, |
| 91 | 91 | ||
| 92 | {{1|(11<<4)}, {20.36*11, 21.33}, 1}, | 92 | {{1|(11<<4)}, {20.36*11, 21.33}, 1}, |
| 93 | {{1|(10<<4)}, {20.36*10, 21.33}, 0}, | 93 | {{1|(10<<4)}, {20.36*10, 21.33}, 4}, |
| 94 | {{1|(9<<4)}, {20.36*9, 21.33}, 0}, | 94 | {{1|(9<<4)}, {20.36*9, 21.33}, 4}, |
| 95 | {{1|(8<<4)}, {20.36*8, 21.33}, 0}, | 95 | {{1|(8<<4)}, {20.36*8, 21.33}, 4}, |
| 96 | {{1|(7<<4)}, {20.36*7, 21.33}, 0}, | 96 | {{1|(7<<4)}, {20.36*7, 21.33}, 4}, |
| 97 | {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, | 97 | {{1|(6<<4)}, { 20.36*6, 21.33}, 4}, |
| 98 | {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, | 98 | {{1|(5<<4)}, { 20.36*5, 21.33}, 4}, |
| 99 | {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, | 99 | {{1|(4<<4)}, { 20.36*4, 21.33}, 4}, |
| 100 | {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, | 100 | {{1|(3<<4)}, { 20.36*3, 21.33}, 4}, |
| 101 | {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, | 101 | {{1|(2<<4)}, { 20.36*2, 21.33}, 4}, |
| 102 | {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, | 102 | {{1|(1<<4)}, { 20.36*1, 21.33}, 4}, |
| 103 | {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, | 103 | {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, |
| 104 | 104 | ||
| 105 | {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, | 105 | {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, |
| 106 | {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, | 106 | {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, |
| 107 | 107 | ||
| 108 | {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, | 108 | {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, |
| 109 | {{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, | 109 | {{2|(10<<4)}, {20.36*10, 21.33*2}, 4}, |
| 110 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, | 110 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 4}, |
| 111 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, | 111 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 4}, |
| 112 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, | 112 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 4}, |
| 113 | {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, | 113 | {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4}, |
| 114 | {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, | 114 | {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4}, |
| 115 | {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, | 115 | {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4}, |
| 116 | {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, | 116 | {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4}, |
| 117 | {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, | 117 | {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4}, |
| 118 | {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, | 118 | {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4}, |
| 119 | {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, | 119 | {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, |
| 120 | 120 | ||
| 121 | {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, | 121 | {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, |
| @@ -205,7 +205,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 205 | 205 | ||
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| 208 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 208 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 209 | 209 | ||
| 210 | {{0|(11<<4)}, {20.36*11, 0}, 1}, | 210 | {{0|(11<<4)}, {20.36*11, 0}, 1}, |
| 211 | {{0|(10<<4)}, {20.36*10, 0}, 1}, | 211 | {{0|(10<<4)}, {20.36*10, 0}, 1}, |
| @@ -224,32 +224,32 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 224 | {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, | 224 | {{0|(13<<4)}, {20.36*0,21.33*0.5}, 1}, |
| 225 | 225 | ||
| 226 | {{1|(11<<4)}, {20.36*11, 21.33}, 1}, | 226 | {{1|(11<<4)}, {20.36*11, 21.33}, 1}, |
| 227 | {{1|(10<<4)}, {20.36*10, 21.33}, 0}, | 227 | {{1|(10<<4)}, {20.36*10, 21.33}, 4}, |
| 228 | {{1|(9<<4)}, {20.36*9, 21.33}, 0}, | 228 | {{1|(9<<4)}, {20.36*9, 21.33}, 4}, |
| 229 | {{1|(8<<4)}, {20.36*8, 21.33}, 0}, | 229 | {{1|(8<<4)}, {20.36*8, 21.33}, 4}, |
| 230 | {{1|(7<<4)}, {20.36*7, 21.33}, 0}, | 230 | {{1|(7<<4)}, {20.36*7, 21.33}, 4}, |
| 231 | {{1|(6<<4)}, { 20.36*6, 21.33}, 0}, | 231 | {{1|(6<<4)}, { 20.36*6, 21.33}, 4}, |
| 232 | {{1|(5<<4)}, { 20.36*5, 21.33}, 0}, | 232 | {{1|(5<<4)}, { 20.36*5, 21.33}, 4}, |
| 233 | {{1|(4<<4)}, { 20.36*4, 21.33}, 0}, | 233 | {{1|(4<<4)}, { 20.36*4, 21.33}, 4}, |
| 234 | {{1|(3<<4)}, { 20.36*3, 21.33}, 0}, | 234 | {{1|(3<<4)}, { 20.36*3, 21.33}, 4}, |
| 235 | {{1|(2<<4)}, { 20.36*2, 21.33}, 0}, | 235 | {{1|(2<<4)}, { 20.36*2, 21.33}, 4}, |
| 236 | {{1|(1<<4)}, { 20.36*1, 21.33}, 0}, | 236 | {{1|(1<<4)}, { 20.36*1, 21.33}, 4}, |
| 237 | {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, | 237 | {{1|(0<<4)}, { 20.36*0, 21.33}, 1}, |
| 238 | 238 | ||
| 239 | {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, | 239 | {{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1}, |
| 240 | {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, | 240 | {{1|(13<<4)}, {20.36*0,21.33*1.5}, 1}, |
| 241 | 241 | ||
| 242 | {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, | 242 | {{2|(11<<4)}, {20.36*11, 21.33*2}, 1}, |
| 243 | {{2|(10<<4)}, {20.36*10, 21.33*2}, 0}, | 243 | {{2|(10<<4)}, {20.36*10, 21.33*2}, 4}, |
| 244 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, | 244 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 4}, |
| 245 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, | 245 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 4}, |
| 246 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, | 246 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 4}, |
| 247 | {{2|(6<<4)}, { 20.36*6, 21.33*2}, 0}, | 247 | {{2|(6<<4)}, { 20.36*6, 21.33*2}, 4}, |
| 248 | {{2|(5<<4)}, { 20.36*5, 21.33*2}, 0}, | 248 | {{2|(5<<4)}, { 20.36*5, 21.33*2}, 4}, |
| 249 | {{2|(4<<4)}, { 20.36*4, 21.33*2}, 0}, | 249 | {{2|(4<<4)}, { 20.36*4, 21.33*2}, 4}, |
| 250 | {{2|(3<<4)}, { 20.36*3, 21.33*2}, 0}, | 250 | {{2|(3<<4)}, { 20.36*3, 21.33*2}, 4}, |
| 251 | {{2|(2<<4)}, { 20.36*2, 21.33*2}, 0}, | 251 | {{2|(2<<4)}, { 20.36*2, 21.33*2}, 4}, |
| 252 | {{2|(1<<4)}, { 20.36*1, 21.33*2}, 0}, | 252 | {{2|(1<<4)}, { 20.36*1, 21.33*2}, 4}, |
| 253 | {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, | 253 | {{2|(0<<4)}, { 20.36*0, 21.33*2}, 1}, |
| 254 | 254 | ||
| 255 | {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, | 255 | {{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1}, |
diff --git a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c index 6ea7421c9..59b917121 100644 --- a/keyboards/dztech/dz40rgb/keymaps/default/keymap.c +++ b/keyboards/dztech/dz40rgb/keymaps/default/keymap.c | |||
| @@ -35,10 +35,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 35 | rgb_led led; | 35 | rgb_led led; |
| 36 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 36 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 37 | led = g_rgb_leds[i]; | 37 | led = g_rgb_leds[i]; |
| 38 | if (led.matrix_co.raw < 0xFF) { | 38 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 39 | if (led.modifier) { | 39 | rgb_matrix_set_color( i, red, green, blue ); |
| 40 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 41 | } | ||
| 42 | } | 40 | } |
| 43 | } | 41 | } |
| 44 | } | 42 | } |
diff --git a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c index bbbe5a8f0..5613e3500 100644 --- a/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c +++ b/keyboards/dztech/dz40rgb/keymaps/split_space/keymap.c | |||
| @@ -58,10 +58,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 58 | rgb_led led; | 58 | rgb_led led; |
| 59 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 59 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 60 | led = g_rgb_leds[i]; | 60 | led = g_rgb_leds[i]; |
| 61 | if (led.matrix_co.raw < 0xFF) { | 61 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 62 | if (led.modifier) { | 62 | rgb_matrix_set_color( i, red, green, blue ); |
| 63 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 64 | } | ||
| 65 | } | 63 | } |
| 66 | } | 64 | } |
| 67 | } | 65 | } |
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index a6825e750..10b2ea7a8 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c | |||
| @@ -64,7 +64,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 64 | {0, H_16, G_16, I_16}, | 64 | {0, H_16, G_16, I_16}, |
| 65 | {0, K_16, J_16, L_16}, | 65 | {0, K_16, J_16, L_16}, |
| 66 | }; | 66 | }; |
| 67 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 67 | |
| 68 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | ||
| 68 | {{0|(13<<4)}, {16*13.5, 0}, 1}, | 69 | {{0|(13<<4)}, {16*13.5, 0}, 1}, |
| 69 | {{0|(12<<4)}, {16*12, 0}, 1}, | 70 | {{0|(12<<4)}, {16*12, 0}, 1}, |
| 70 | {{0|(11<<4)}, {16*11, 0}, 1}, | 71 | {{0|(11<<4)}, {16*11, 0}, 1}, |
| @@ -80,49 +81,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 80 | {{0|(1<<4)}, {16*1, 0}, 1}, | 81 | {{0|(1<<4)}, {16*1, 0}, 1}, |
| 81 | {{0|(0<<4)}, {16*0, 0}, 1}, | 82 | {{0|(0<<4)}, {16*0, 0}, 1}, |
| 82 | {{2|(13<<4)}, {16*13.75, 24}, 1}, | 83 | {{2|(13<<4)}, {16*13.75, 24}, 1}, |
| 83 | {{1|(12<<4)}, {16*12.5, 16}, 0}, | 84 | {{1|(12<<4)}, {16*12.5, 16}, 4}, |
| 84 | {{1|(11<<4)}, {16*11.5, 16}, 0}, | 85 | {{1|(11<<4)}, {16*11.5, 16}, 4}, |
| 85 | {{1|(10<<4)}, {16*10.5, 16}, 0}, | 86 | {{1|(10<<4)}, {16*10.5, 16}, 4}, |
| 86 | {{1|(9<<4)}, { 16*9.5, 16}, 0}, | 87 | {{1|(9<<4)}, { 16*9.5, 16}, 4}, |
| 87 | {{1|(8<<4)}, { 16*8.5, 16}, 0}, | 88 | {{1|(8<<4)}, { 16*8.5, 16}, 4}, |
| 88 | {{1|(7<<4)}, { 16*7.5, 16}, 0}, | 89 | {{1|(7<<4)}, { 16*7.5, 16}, 4}, |
| 89 | {{1|(6<<4)}, { 16*6.5, 16}, 0}, | 90 | {{1|(6<<4)}, { 16*6.5, 16}, 4}, |
| 90 | {{1|(5<<4)}, { 16*5.5, 16}, 0}, | 91 | {{1|(5<<4)}, { 16*5.5, 16}, 4}, |
| 91 | {{1|(4<<4)}, { 16*4.5, 16}, 0}, | 92 | {{1|(4<<4)}, { 16*4.5, 16}, 4}, |
| 92 | {{1|(3<<4)}, { 16*3.5, 16}, 0}, | 93 | {{1|(3<<4)}, { 16*3.5, 16}, 4}, |
| 93 | {{1|(2<<4)}, { 16*2.5, 16}, 0}, | 94 | {{1|(2<<4)}, { 16*2.5, 16}, 4}, |
| 94 | {{1|(1<<4)}, { 16*1.5, 16}, 0}, | 95 | {{1|(1<<4)}, { 16*1.5, 16}, 4}, |
| 95 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, | 96 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, |
| 96 | {{1|(13<<4)}, {16*12.75, 32}, 1}, | 97 | {{1|(13<<4)}, {16*12.75, 32}, 1}, |
| 97 | {{2|(11<<4)}, {16*11.75, 32}, 0}, | 98 | {{2|(11<<4)}, {16*11.75, 32}, 4}, |
| 98 | {{2|(10<<4)}, {16*10.75, 32}, 0}, | 99 | {{2|(10<<4)}, {16*10.75, 32}, 4}, |
| 99 | {{2|(9<<4)}, {16*9.75, 32}, 0}, | 100 | {{2|(9<<4)}, {16*9.75, 32}, 4}, |
| 100 | {{2|(8<<4)}, {16*8.75, 32}, 0}, | 101 | {{2|(8<<4)}, {16*8.75, 32}, 4}, |
| 101 | {{2|(7<<4)}, {16*7.75, 32}, 0}, | 102 | {{2|(7<<4)}, {16*7.75, 32}, 4}, |
| 102 | {{2|(6<<4)}, { 16*6.75, 32}, 0}, | 103 | {{2|(6<<4)}, { 16*6.75, 32}, 4}, |
| 103 | {{2|(5<<4)}, { 16*5.75, 32}, 0}, | 104 | {{2|(5<<4)}, { 16*5.75, 32}, 4}, |
| 104 | {{2|(4<<4)}, { 16*4.75, 32}, 0}, | 105 | {{2|(4<<4)}, { 16*4.75, 32}, 4}, |
| 105 | {{2|(3<<4)}, { 16*3.75, 32}, 0}, | 106 | {{2|(3<<4)}, { 16*3.75, 32}, 4}, |
| 106 | {{2|(2<<4)}, { 16*2.75, 32}, 0}, | 107 | {{2|(2<<4)}, { 16*2.75, 32}, 4}, |
| 107 | {{2|(1<<4)}, { 16*1.75, 32}, 0}, | 108 | {{2|(1<<4)}, { 16*1.75, 32}, 4}, |
| 108 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, | 109 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, |
| 109 | {{3|(11<<4)}, {16*13.125, 48}, 1}, | 110 | {{3|(11<<4)}, {16*13.125, 48}, 1}, |
| 110 | {{3|(10<<4)}, {16*11.25, 48}, 0}, | 111 | {{3|(10<<4)}, {16*11.25, 48}, 4}, |
| 111 | {{3|(9<<4)}, {16*10.25, 48}, 0}, | 112 | {{3|(9<<4)}, {16*10.25, 48}, 4}, |
| 112 | {{3|(8<<4)}, {16*9.25, 48}, 0}, | 113 | {{3|(8<<4)}, {16*9.25, 48}, 4}, |
| 113 | {{3|(7<<4)}, {16*8.25, 48}, 0}, | 114 | {{3|(7<<4)}, {16*8.25, 48}, 4}, |
| 114 | {{3|(6<<4)}, {16*7.25, 48}, 0}, | 115 | {{3|(6<<4)}, {16*7.25, 48}, 4}, |
| 115 | {{3|(5<<4)}, {16*6.25, 48}, 0}, | 116 | {{3|(5<<4)}, {16*6.25, 48}, 4}, |
| 116 | {{3|(4<<4)}, {16*5.25, 48}, 0}, | 117 | {{3|(4<<4)}, {16*5.25, 48}, 4}, |
| 117 | {{3|(3<<4)}, {16*4.25, 48}, 0}, | 118 | {{3|(3<<4)}, {16*4.25, 48}, 4}, |
| 118 | {{3|(2<<4)}, {16*3.25, 48}, 0}, | 119 | {{3|(2<<4)}, {16*3.25, 48}, 4}, |
| 119 | {{3|(1<<4)}, {16*1.25, 48}, 0}, | 120 | {{3|(1<<4)}, {16*1.25, 48}, 4}, |
| 120 | {{3|(0<<4)}, {16*0.625, 48}, 1}, | 121 | {{3|(0<<4)}, {16*0.625, 48}, 1}, |
| 121 | {{4|(13<<4)}, {16*13.875, 64}, 1}, | 122 | {{4|(13<<4)}, {16*13.875, 64}, 1}, |
| 122 | {{4|(11<<4)}, {16*12.625, 64}, 1}, | 123 | {{4|(11<<4)}, {16*12.625, 64}, 1}, |
| 123 | {{4|(10<<4)}, {16*11.375, 64}, 1}, | 124 | {{4|(10<<4)}, {16*11.375, 64}, 1}, |
| 124 | {{4|(9<<4)}, {16*10.125, 64}, 1}, | 125 | {{4|(9<<4)}, {16*10.125, 64}, 1}, |
| 125 | {{4|(5<<4)}, { 16*6.375, 64}, 0}, | 126 | {{4|(5<<4)}, { 16*6.375, 64}, 4}, |
| 126 | {{4|(2<<4)}, { 16*2.625, 64}, 1}, | 127 | {{4|(2<<4)}, { 16*2.625, 64}, 1}, |
| 127 | {{4|(1<<4)}, { 16*1.375, 64}, 1}, | 128 | {{4|(1<<4)}, { 16*1.375, 64}, 1}, |
| 128 | {{4|(0<<4)}, { 16*0.125, 64}, 1}, | 129 | {{4|(0<<4)}, { 16*0.125, 64}, 1}, |
| @@ -192,7 +193,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 192 | {0, H_16, G_16, I_16}, | 193 | {0, H_16, G_16, I_16}, |
| 193 | {0, K_16, J_16, L_16}, | 194 | {0, K_16, J_16, L_16}, |
| 194 | }; | 195 | }; |
| 195 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 196 | |
| 197 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | ||
| 196 | {{2|(12<<4)}, {16*14, 0}, 1}, | 198 | {{2|(12<<4)}, {16*14, 0}, 1}, |
| 197 | {{0|(13<<4)}, {16*13, 0}, 1}, | 199 | {{0|(13<<4)}, {16*13, 0}, 1}, |
| 198 | {{0|(12<<4)}, {16*12, 0}, 1}, | 200 | {{0|(12<<4)}, {16*12, 0}, 1}, |
| @@ -209,49 +211,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 209 | {{0|(1<<4)}, {16*1, 0}, 1}, | 211 | {{0|(1<<4)}, {16*1, 0}, 1}, |
| 210 | {{0|(0<<4)}, {16*0, 0}, 1}, | 212 | {{0|(0<<4)}, {16*0, 0}, 1}, |
| 211 | {{1|(13<<4)}, {16*13.75, 16}, 1}, | 213 | {{1|(13<<4)}, {16*13.75, 16}, 1}, |
| 212 | {{1|(12<<4)}, {16*12.5, 16}, 0}, | 214 | {{1|(12<<4)}, {16*12.5, 16}, 4}, |
| 213 | {{1|(11<<4)}, {16*11.5, 16}, 0}, | 215 | {{1|(11<<4)}, {16*11.5, 16}, 4}, |
| 214 | {{1|(10<<4)}, {16*10.5, 16}, 0}, | 216 | {{1|(10<<4)}, {16*10.5, 16}, 4}, |
| 215 | {{1|(9<<4)}, { 16*9.5, 16}, 0}, | 217 | {{1|(9<<4)}, { 16*9.5, 16}, 4}, |
| 216 | {{1|(8<<4)}, { 16*8.5, 16}, 0}, | 218 | {{1|(8<<4)}, { 16*8.5, 16}, 4}, |
| 217 | {{1|(7<<4)}, { 16*7.5, 16}, 0}, | 219 | {{1|(7<<4)}, { 16*7.5, 16}, 4}, |
| 218 | {{1|(6<<4)}, { 16*6.5, 16}, 0}, | 220 | {{1|(6<<4)}, { 16*6.5, 16}, 4}, |
| 219 | {{1|(5<<4)}, { 16*5.5, 16}, 0}, | 221 | {{1|(5<<4)}, { 16*5.5, 16}, 4}, |
| 220 | {{1|(4<<4)}, { 16*4.5, 16}, 0}, | 222 | {{1|(4<<4)}, { 16*4.5, 16}, 4}, |
| 221 | {{1|(3<<4)}, { 16*3.5, 16}, 0}, | 223 | {{1|(3<<4)}, { 16*3.5, 16}, 4}, |
| 222 | {{1|(2<<4)}, { 16*2.5, 16}, 0}, | 224 | {{1|(2<<4)}, { 16*2.5, 16}, 4}, |
| 223 | {{1|(1<<4)}, { 16*1.5, 16}, 0}, | 225 | {{1|(1<<4)}, { 16*1.5, 16}, 4}, |
| 224 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, | 226 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, |
| 225 | {{2|(13<<4)}, {16*12.75, 32}, 1}, | 227 | {{2|(13<<4)}, {16*12.75, 32}, 1}, |
| 226 | {{2|(11<<4)}, {16*11.75, 32}, 0}, | 228 | {{2|(11<<4)}, {16*11.75, 32}, 4}, |
| 227 | {{2|(10<<4)}, {16*10.75, 32}, 0}, | 229 | {{2|(10<<4)}, {16*10.75, 32}, 4}, |
| 228 | {{2|(9<<4)}, {16*9.75, 32}, 0}, | 230 | {{2|(9<<4)}, {16*9.75, 32}, 4}, |
| 229 | {{2|(8<<4)}, {16*8.75, 32}, 0}, | 231 | {{2|(8<<4)}, {16*8.75, 32}, 4}, |
| 230 | {{2|(7<<4)}, {16*7.75, 32}, 0}, | 232 | {{2|(7<<4)}, {16*7.75, 32}, 4}, |
| 231 | {{2|(6<<4)}, { 16*6.75, 32}, 0}, | 233 | {{2|(6<<4)}, { 16*6.75, 32}, 4}, |
| 232 | {{2|(5<<4)}, { 16*5.75, 32}, 0}, | 234 | {{2|(5<<4)}, { 16*5.75, 32}, 4}, |
| 233 | {{2|(4<<4)}, { 16*4.75, 32}, 0}, | 235 | {{2|(4<<4)}, { 16*4.75, 32}, 4}, |
| 234 | {{2|(3<<4)}, { 16*3.75, 32}, 0}, | 236 | {{2|(3<<4)}, { 16*3.75, 32}, 4}, |
| 235 | {{2|(2<<4)}, { 16*2.75, 32}, 0}, | 237 | {{2|(2<<4)}, { 16*2.75, 32}, 4}, |
| 236 | {{2|(1<<4)}, { 16*1.75, 32}, 0}, | 238 | {{2|(1<<4)}, { 16*1.75, 32}, 4}, |
| 237 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, | 239 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, |
| 238 | {{3|(13<<4)}, {16*14, 48}, 1}, | 240 | {{3|(13<<4)}, {16*14, 48}, 1}, |
| 239 | {{3|(11<<4)}, {16*12.625, 48}, 0}, | 241 | {{3|(11<<4)}, {16*12.625, 48}, 4}, |
| 240 | {{3|(10<<4)}, {16*11.25, 48}, 0}, | 242 | {{3|(10<<4)}, {16*11.25, 48}, 4}, |
| 241 | {{3|(9<<4)}, {16*10.25, 48}, 0}, | 243 | {{3|(9<<4)}, {16*10.25, 48}, 4}, |
| 242 | {{3|(8<<4)}, {16*9.25, 48}, 0}, | 244 | {{3|(8<<4)}, {16*9.25, 48}, 4}, |
| 243 | {{3|(7<<4)}, {16*8.25, 48}, 0}, | 245 | {{3|(7<<4)}, {16*8.25, 48}, 4}, |
| 244 | {{3|(6<<4)}, {16*7.25, 48}, 0}, | 246 | {{3|(6<<4)}, {16*7.25, 48}, 4}, |
| 245 | {{3|(5<<4)}, {16*6.25, 48}, 0}, | 247 | {{3|(5<<4)}, {16*6.25, 48}, 4}, |
| 246 | {{3|(4<<4)}, {16*5.25, 48}, 0}, | 248 | {{3|(4<<4)}, {16*5.25, 48}, 4}, |
| 247 | {{3|(3<<4)}, {16*4.25, 48}, 0}, | 249 | {{3|(3<<4)}, {16*4.25, 48}, 4}, |
| 248 | {{3|(2<<4)}, {16*3.25, 48}, 0}, | 250 | {{3|(2<<4)}, {16*3.25, 48}, 4}, |
| 249 | {{3|(1<<4)}, {16*1.25, 48}, 0}, | 251 | {{3|(1<<4)}, {16*1.25, 48}, 4}, |
| 250 | {{3|(0<<4)}, {16*0.625, 48}, 1}, | 252 | {{3|(0<<4)}, {16*0.625, 48}, 1}, |
| 251 | {{4|(13<<4)}, {16*13.625, 64}, 1}, | 253 | {{4|(13<<4)}, {16*13.625, 64}, 1}, |
| 252 | {{4|(11<<4)}, {16*12.375, 64}, 1}, | 254 | {{4|(11<<4)}, {16*12.375, 64}, 1}, |
| 253 | {{4|(10<<4)}, {16*11.125, 64}, 1}, | 255 | {{4|(10<<4)}, {16*11.125, 64}, 1}, |
| 254 | {{4|(5<<4)}, { 16*7, 64}, 0}, | 256 | {{4|(5<<4)}, { 16*7, 64}, 4}, |
| 255 | {{4|(2<<4)}, { 16*2.875, 64}, 1}, | 257 | {{4|(2<<4)}, { 16*2.875, 64}, 1}, |
| 256 | {{4|(1<<4)}, { 16*1.625, 64}, 1}, | 258 | {{4|(1<<4)}, { 16*1.625, 64}, 1}, |
| 257 | {{4|(0<<4)}, { 16*0.375, 64}, 1}, | 259 | {{4|(0<<4)}, { 16*0.375, 64}, 1}, |
| @@ -321,7 +323,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 321 | {0, H_16, G_16, I_16}, | 323 | {0, H_16, G_16, I_16}, |
| 322 | {0, K_16, J_16, L_16}, | 324 | {0, K_16, J_16, L_16}, |
| 323 | }; | 325 | }; |
| 324 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 326 | |
| 327 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | ||
| 325 | {{2|(12<<4)}, {16*14, 0}, 1}, | 328 | {{2|(12<<4)}, {16*14, 0}, 1}, |
| 326 | {{0|(13<<4)}, {16*13, 0}, 1}, | 329 | {{0|(13<<4)}, {16*13, 0}, 1}, |
| 327 | {{0|(12<<4)}, {16*12, 0}, 1}, | 330 | {{0|(12<<4)}, {16*12, 0}, 1}, |
| @@ -338,49 +341,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 338 | {{0|(1<<4)}, {16*1, 0}, 1}, | 341 | {{0|(1<<4)}, {16*1, 0}, 1}, |
| 339 | {{0|(0<<4)}, {16*0, 0}, 1}, | 342 | {{0|(0<<4)}, {16*0, 0}, 1}, |
| 340 | {{2|(13<<4)}, {16*13.75, 24}, 1}, | 343 | {{2|(13<<4)}, {16*13.75, 24}, 1}, |
| 341 | {{1|(12<<4)}, {16*12.5, 16}, 0}, | 344 | {{1|(12<<4)}, {16*12.5, 16}, 4}, |
| 342 | {{1|(11<<4)}, {16*11.5, 16}, 0}, | 345 | {{1|(11<<4)}, {16*11.5, 16}, 4}, |
| 343 | {{1|(10<<4)}, {16*10.5, 16}, 0}, | 346 | {{1|(10<<4)}, {16*10.5, 16}, 4}, |
| 344 | {{1|(9<<4)}, { 16*9.5, 16}, 0}, | 347 | {{1|(9<<4)}, { 16*9.5, 16}, 4}, |
| 345 | {{1|(8<<4)}, { 16*8.5, 16}, 0}, | 348 | {{1|(8<<4)}, { 16*8.5, 16}, 4}, |
| 346 | {{1|(7<<4)}, { 16*7.5, 16}, 0}, | 349 | {{1|(7<<4)}, { 16*7.5, 16}, 4}, |
| 347 | {{1|(6<<4)}, { 16*6.5, 16}, 0}, | 350 | {{1|(6<<4)}, { 16*6.5, 16}, 4}, |
| 348 | {{1|(5<<4)}, { 16*5.5, 16}, 0}, | 351 | {{1|(5<<4)}, { 16*5.5, 16}, 4}, |
| 349 | {{1|(4<<4)}, { 16*4.5, 16}, 0}, | 352 | {{1|(4<<4)}, { 16*4.5, 16}, 4}, |
| 350 | {{1|(3<<4)}, { 16*3.5, 16}, 0}, | 353 | {{1|(3<<4)}, { 16*3.5, 16}, 4}, |
| 351 | {{1|(2<<4)}, { 16*2.5, 16}, 0}, | 354 | {{1|(2<<4)}, { 16*2.5, 16}, 4}, |
| 352 | {{1|(1<<4)}, { 16*1.5, 16}, 0}, | 355 | {{1|(1<<4)}, { 16*1.5, 16}, 4}, |
| 353 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, | 356 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, |
| 354 | {{1|(13<<4)}, {16*12.75, 32}, 1}, | 357 | {{1|(13<<4)}, {16*12.75, 32}, 1}, |
| 355 | {{2|(11<<4)}, {16*11.75, 32}, 0}, | 358 | {{2|(11<<4)}, {16*11.75, 32}, 4}, |
| 356 | {{2|(10<<4)}, {16*10.75, 32}, 0}, | 359 | {{2|(10<<4)}, {16*10.75, 32}, 4}, |
| 357 | {{2|(9<<4)}, {16*9.75, 32}, 0}, | 360 | {{2|(9<<4)}, {16*9.75, 32}, 4}, |
| 358 | {{2|(8<<4)}, {16*8.75, 32}, 0}, | 361 | {{2|(8<<4)}, {16*8.75, 32}, 4}, |
| 359 | {{2|(7<<4)}, {16*7.75, 32}, 0}, | 362 | {{2|(7<<4)}, {16*7.75, 32}, 4}, |
| 360 | {{2|(6<<4)}, { 16*6.75, 32}, 0}, | 363 | {{2|(6<<4)}, { 16*6.75, 32}, 4}, |
| 361 | {{2|(5<<4)}, { 16*5.75, 32}, 0}, | 364 | {{2|(5<<4)}, { 16*5.75, 32}, 4}, |
| 362 | {{2|(4<<4)}, { 16*4.75, 32}, 0}, | 365 | {{2|(4<<4)}, { 16*4.75, 32}, 4}, |
| 363 | {{2|(3<<4)}, { 16*3.75, 32}, 0}, | 366 | {{2|(3<<4)}, { 16*3.75, 32}, 4}, |
| 364 | {{2|(2<<4)}, { 16*2.75, 32}, 0}, | 367 | {{2|(2<<4)}, { 16*2.75, 32}, 4}, |
| 365 | {{2|(1<<4)}, { 16*1.75, 32}, 0}, | 368 | {{2|(1<<4)}, { 16*1.75, 32}, 4}, |
| 366 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, | 369 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, |
| 367 | {{3|(13<<4)}, {16*14, 48}, 1}, | 370 | {{3|(13<<4)}, {16*14, 48}, 1}, |
| 368 | {{3|(11<<4)}, {16*12.625, 48}, 0}, | 371 | {{3|(11<<4)}, {16*12.625, 48}, 4}, |
| 369 | {{3|(10<<4)}, {16*11.25, 48}, 0}, | 372 | {{3|(10<<4)}, {16*11.25, 48}, 4}, |
| 370 | {{3|(9<<4)}, {16*10.25, 48}, 0}, | 373 | {{3|(9<<4)}, {16*10.25, 48}, 4}, |
| 371 | {{3|(8<<4)}, {16*9.25, 48}, 0}, | 374 | {{3|(8<<4)}, {16*9.25, 48}, 4}, |
| 372 | {{3|(7<<4)}, {16*8.25, 48}, 0}, | 375 | {{3|(7<<4)}, {16*8.25, 48}, 4}, |
| 373 | {{3|(6<<4)}, {16*7.25, 48}, 0}, | 376 | {{3|(6<<4)}, {16*7.25, 48}, 4}, |
| 374 | {{3|(5<<4)}, {16*6.25, 48}, 0}, | 377 | {{3|(5<<4)}, {16*6.25, 48}, 4}, |
| 375 | {{3|(4<<4)}, {16*5.25, 48}, 0}, | 378 | {{3|(4<<4)}, {16*5.25, 48}, 4}, |
| 376 | {{3|(3<<4)}, {16*4.25, 48}, 0}, | 379 | {{3|(3<<4)}, {16*4.25, 48}, 4}, |
| 377 | {{3|(2<<4)}, {16*3.25, 48}, 0}, | 380 | {{3|(2<<4)}, {16*3.25, 48}, 4}, |
| 378 | {{3|(1<<4)}, {16*1.25, 48}, 0}, | 381 | {{3|(1<<4)}, {16*1.25, 48}, 4}, |
| 379 | {{3|(0<<4)}, {16*0.625, 48}, 1}, | 382 | {{3|(0<<4)}, {16*0.625, 48}, 1}, |
| 380 | {{4|(13<<4)}, {16*13.625, 64}, 1}, | 383 | {{4|(13<<4)}, {16*13.625, 64}, 1}, |
| 381 | {{4|(11<<4)}, {16*12.375, 64}, 1}, | 384 | {{4|(11<<4)}, {16*12.375, 64}, 1}, |
| 382 | {{4|(10<<4)}, {16*11.125, 64}, 1}, | 385 | {{4|(10<<4)}, {16*11.125, 64}, 1}, |
| 383 | {{4|(5<<4)}, { 16*7, 64}, 0}, | 386 | {{4|(5<<4)}, { 16*7, 64}, 4}, |
| 384 | {{4|(2<<4)}, { 16*2.875, 64}, 1}, | 387 | {{4|(2<<4)}, { 16*2.875, 64}, 1}, |
| 385 | {{4|(1<<4)}, { 16*1.625, 64}, 1}, | 388 | {{4|(1<<4)}, { 16*1.625, 64}, 1}, |
| 386 | {{4|(0<<4)}, { 16*0.375, 64}, 1}, | 389 | {{4|(0<<4)}, { 16*0.375, 64}, 1}, |
| @@ -449,7 +452,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 449 | {0, H_16, G_16, I_16}, | 452 | {0, H_16, G_16, I_16}, |
| 450 | {0, K_16, J_16, L_16}, | 453 | {0, K_16, J_16, L_16}, |
| 451 | }; | 454 | }; |
| 452 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 455 | |
| 456 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | ||
| 453 | {{0|(13<<4)}, {16*13.5, 0}, 1}, | 457 | {{0|(13<<4)}, {16*13.5, 0}, 1}, |
| 454 | {{0|(12<<4)}, {16*12, 0}, 1}, | 458 | {{0|(12<<4)}, {16*12, 0}, 1}, |
| 455 | {{0|(11<<4)}, {16*11, 0}, 1}, | 459 | {{0|(11<<4)}, {16*11, 0}, 1}, |
| @@ -465,49 +469,49 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 465 | {{0|(1<<4)}, {16*1, 0}, 1}, | 469 | {{0|(1<<4)}, {16*1, 0}, 1}, |
| 466 | {{0|(0<<4)}, {16*0, 0}, 1}, | 470 | {{0|(0<<4)}, {16*0, 0}, 1}, |
| 467 | {{1|(13<<4)}, {16*13.75, 16}, 1}, | 471 | {{1|(13<<4)}, {16*13.75, 16}, 1}, |
| 468 | {{1|(12<<4)}, {16*12.5, 16}, 0}, | 472 | {{1|(12<<4)}, {16*12.5, 16}, 4}, |
| 469 | {{1|(11<<4)}, {16*11.5, 16}, 0}, | 473 | {{1|(11<<4)}, {16*11.5, 16}, 4}, |
| 470 | {{1|(10<<4)}, {16*10.5, 16}, 0}, | 474 | {{1|(10<<4)}, {16*10.5, 16}, 4}, |
| 471 | {{1|(9<<4)}, { 16*9.5, 16}, 0}, | 475 | {{1|(9<<4)}, { 16*9.5, 16}, 4}, |
| 472 | {{1|(8<<4)}, { 16*8.5, 16}, 0}, | 476 | {{1|(8<<4)}, { 16*8.5, 16}, 4}, |
| 473 | {{1|(7<<4)}, { 16*7.5, 16}, 0}, | 477 | {{1|(7<<4)}, { 16*7.5, 16}, 4}, |
| 474 | {{1|(6<<4)}, { 16*6.5, 16}, 0}, | 478 | {{1|(6<<4)}, { 16*6.5, 16}, 4}, |
| 475 | {{1|(5<<4)}, { 16*5.5, 16}, 0}, | 479 | {{1|(5<<4)}, { 16*5.5, 16}, 4}, |
| 476 | {{1|(4<<4)}, { 16*4.5, 16}, 0}, | 480 | {{1|(4<<4)}, { 16*4.5, 16}, 4}, |
| 477 | {{1|(3<<4)}, { 16*3.5, 16}, 0}, | 481 | {{1|(3<<4)}, { 16*3.5, 16}, 4}, |
| 478 | {{1|(2<<4)}, { 16*2.5, 16}, 0}, | 482 | {{1|(2<<4)}, { 16*2.5, 16}, 4}, |
| 479 | {{1|(1<<4)}, { 16*1.5, 16}, 0}, | 483 | {{1|(1<<4)}, { 16*1.5, 16}, 4}, |
| 480 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, | 484 | {{1|(0<<4)}, { 16*0.25, 16}, 1}, |
| 481 | {{2|(13<<4)}, {16*13.375, 24}, 1}, | 485 | {{2|(13<<4)}, {16*13.375, 24}, 1}, |
| 482 | {{2|(11<<4)}, {16*11.75, 32}, 0}, | 486 | {{2|(11<<4)}, {16*11.75, 32}, 4}, |
| 483 | {{2|(10<<4)}, {16*10.75, 32}, 0}, | 487 | {{2|(10<<4)}, {16*10.75, 32}, 4}, |
| 484 | {{2|(9<<4)}, {16*9.75, 32}, 0}, | 488 | {{2|(9<<4)}, {16*9.75, 32}, 4}, |
| 485 | {{2|(8<<4)}, {16*8.75, 32}, 0}, | 489 | {{2|(8<<4)}, {16*8.75, 32}, 4}, |
| 486 | {{2|(7<<4)}, {16*7.75, 32}, 0}, | 490 | {{2|(7<<4)}, {16*7.75, 32}, 4}, |
| 487 | {{2|(6<<4)}, { 16*6.75, 32}, 0}, | 491 | {{2|(6<<4)}, { 16*6.75, 32}, 4}, |
| 488 | {{2|(5<<4)}, { 16*5.75, 32}, 0}, | 492 | {{2|(5<<4)}, { 16*5.75, 32}, 4}, |
| 489 | {{2|(4<<4)}, { 16*4.75, 32}, 0}, | 493 | {{2|(4<<4)}, { 16*4.75, 32}, 4}, |
| 490 | {{2|(3<<4)}, { 16*3.75, 32}, 0}, | 494 | {{2|(3<<4)}, { 16*3.75, 32}, 4}, |
| 491 | {{2|(2<<4)}, { 16*2.75, 32}, 0}, | 495 | {{2|(2<<4)}, { 16*2.75, 32}, 4}, |
| 492 | {{2|(1<<4)}, { 16*1.75, 32}, 0}, | 496 | {{2|(1<<4)}, { 16*1.75, 32}, 4}, |
| 493 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, | 497 | {{2|(0<<4)}, { 16*0.375, 32}, 1}, |
| 494 | {{3|(11<<4)}, {16*13.125, 48}, 1}, | 498 | {{3|(11<<4)}, {16*13.125, 48}, 1}, |
| 495 | {{3|(10<<4)}, {16*11.25, 48}, 0}, | 499 | {{3|(10<<4)}, {16*11.25, 48}, 4}, |
| 496 | {{3|(9<<4)}, {16*10.25, 48}, 0}, | 500 | {{3|(9<<4)}, {16*10.25, 48}, 4}, |
| 497 | {{3|(8<<4)}, {16*9.25, 48}, 0}, | 501 | {{3|(8<<4)}, {16*9.25, 48}, 4}, |
| 498 | {{3|(7<<4)}, {16*8.25, 48}, 0}, | 502 | {{3|(7<<4)}, {16*8.25, 48}, 4}, |
| 499 | {{3|(6<<4)}, {16*7.25, 48}, 0}, | 503 | {{3|(6<<4)}, {16*7.25, 48}, 4}, |
| 500 | {{3|(5<<4)}, {16*6.25, 48}, 0}, | 504 | {{3|(5<<4)}, {16*6.25, 48}, 4}, |
| 501 | {{3|(4<<4)}, {16*5.25, 48}, 0}, | 505 | {{3|(4<<4)}, {16*5.25, 48}, 4}, |
| 502 | {{3|(3<<4)}, {16*4.25, 48}, 0}, | 506 | {{3|(3<<4)}, {16*4.25, 48}, 4}, |
| 503 | {{3|(2<<4)}, {16*3.25, 48}, 0}, | 507 | {{3|(2<<4)}, {16*3.25, 48}, 4}, |
| 504 | {{3|(1<<4)}, {16*1.25, 48}, 0}, | 508 | {{3|(1<<4)}, {16*1.25, 48}, 4}, |
| 505 | {{3|(0<<4)}, {16*0.625, 48}, 1}, | 509 | {{3|(0<<4)}, {16*0.625, 48}, 1}, |
| 506 | {{4|(13<<4)}, {16*13.875, 64}, 1}, | 510 | {{4|(13<<4)}, {16*13.875, 64}, 1}, |
| 507 | {{4|(11<<4)}, {16*12.625, 64}, 1}, | 511 | {{4|(11<<4)}, {16*12.625, 64}, 1}, |
| 508 | {{4|(10<<4)}, {16*11.375, 64}, 1}, | 512 | {{4|(10<<4)}, {16*11.375, 64}, 1}, |
| 509 | {{4|(9<<4)}, {16*10.125, 64}, 1}, | 513 | {{4|(9<<4)}, {16*10.125, 64}, 1}, |
| 510 | {{4|(5<<4)}, { 16*6.375, 64}, 0}, | 514 | {{4|(5<<4)}, { 16*6.375, 64}, 4}, |
| 511 | {{4|(2<<4)}, { 16*2.625, 64}, 1}, | 515 | {{4|(2<<4)}, { 16*2.625, 64}, 1}, |
| 512 | {{4|(1<<4)}, { 16*1.375, 64}, 1}, | 516 | {{4|(1<<4)}, { 16*1.375, 64}, 1}, |
| 513 | {{4|(0<<4)}, { 16*0.125, 64}, 1}, | 517 | {{4|(0<<4)}, { 16*0.125, 64}, 1}, |
| @@ -578,7 +582,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 578 | {0, H_16, G_16, I_16}, | 582 | {0, H_16, G_16, I_16}, |
| 579 | {0, K_16, J_16, L_16}, | 583 | {0, K_16, J_16, L_16}, |
| 580 | }; | 584 | }; |
| 581 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 585 | |
| 586 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | ||
| 582 | {{0|(13<<4)}, {17.23*13, 0}, 1}, | 587 | {{0|(13<<4)}, {17.23*13, 0}, 1}, |
| 583 | {{0|(12<<4)}, {17.23*12, 0}, 1}, | 588 | {{0|(12<<4)}, {17.23*12, 0}, 1}, |
| 584 | {{0|(11<<4)}, {17.23*11, 0}, 1}, | 589 | {{0|(11<<4)}, {17.23*11, 0}, 1}, |
| @@ -594,51 +599,51 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 594 | {{0|(1<<4)}, { 17.23*1, 0}, 1}, | 599 | {{0|(1<<4)}, { 17.23*1, 0}, 1}, |
| 595 | {{0|(0<<4)}, { 17.23*0, 0}, 1}, | 600 | {{0|(0<<4)}, { 17.23*0, 0}, 1}, |
| 596 | {{1|(13<<4)}, {17.23*13, 16}, 1}, | 601 | {{1|(13<<4)}, {17.23*13, 16}, 1}, |
| 597 | {{1|(12<<4)}, {17.23*12, 16}, 0}, | 602 | {{1|(12<<4)}, {17.23*12, 16}, 4}, |
| 598 | {{1|(11<<4)}, {17.23*11, 16}, 0}, | 603 | {{1|(11<<4)}, {17.23*11, 16}, 4}, |
| 599 | {{1|(10<<4)}, {17.23*10, 16}, 0}, | 604 | {{1|(10<<4)}, {17.23*10, 16}, 4}, |
| 600 | {{1|(9<<4)}, {17.23*9, 16}, 0}, | 605 | {{1|(9<<4)}, {17.23*9, 16}, 4}, |
| 601 | {{1|(8<<4)}, {17.23*8, 16}, 0}, | 606 | {{1|(8<<4)}, {17.23*8, 16}, 4}, |
| 602 | {{1|(7<<4)}, {17.23*7, 16}, 0}, | 607 | {{1|(7<<4)}, {17.23*7, 16}, 4}, |
| 603 | {{1|(6<<4)}, { 17.23*6, 16}, 0}, | 608 | {{1|(6<<4)}, { 17.23*6, 16}, 4}, |
| 604 | {{1|(5<<4)}, { 17.23*5, 16}, 0}, | 609 | {{1|(5<<4)}, { 17.23*5, 16}, 4}, |
| 605 | {{1|(4<<4)}, { 17.23*4, 16}, 0}, | 610 | {{1|(4<<4)}, { 17.23*4, 16}, 4}, |
| 606 | {{1|(3<<4)}, { 17.23*3, 16}, 0}, | 611 | {{1|(3<<4)}, { 17.23*3, 16}, 4}, |
| 607 | {{1|(2<<4)}, { 17.23*2, 16}, 0}, | 612 | {{1|(2<<4)}, { 17.23*2, 16}, 4}, |
| 608 | {{1|(1<<4)}, { 17.23*1, 16}, 0}, | 613 | {{1|(1<<4)}, { 17.23*1, 16}, 4}, |
| 609 | {{1|(0<<4)}, { 17.23*0, 16}, 1}, | 614 | {{1|(0<<4)}, { 17.23*0, 16}, 1}, |
| 610 | {{2|(13<<4)}, {17.23*13, 32}, 1}, | 615 | {{2|(13<<4)}, {17.23*13, 32}, 1}, |
| 611 | {{2|(11<<4)}, {17.23*11, 32}, 0}, | 616 | {{2|(11<<4)}, {17.23*11, 32}, 4}, |
| 612 | {{2|(10<<4)}, {17.23*10, 32}, 0}, | 617 | {{2|(10<<4)}, {17.23*10, 32}, 4}, |
| 613 | {{2|(9<<4)}, {17.23*9, 32}, 0}, | 618 | {{2|(9<<4)}, {17.23*9, 32}, 4}, |
| 614 | {{2|(8<<4)}, {17.23*8, 32}, 0}, | 619 | {{2|(8<<4)}, {17.23*8, 32}, 4}, |
| 615 | {{2|(7<<4)}, {17.23*7, 32}, 0}, | 620 | {{2|(7<<4)}, {17.23*7, 32}, 4}, |
| 616 | {{2|(6<<4)}, { 17.23*6, 32}, 0}, | 621 | {{2|(6<<4)}, { 17.23*6, 32}, 4}, |
| 617 | {{2|(5<<4)}, { 17.23*5, 32}, 0}, | 622 | {{2|(5<<4)}, { 17.23*5, 32}, 4}, |
| 618 | {{2|(4<<4)}, { 17.23*4, 32}, 0}, | 623 | {{2|(4<<4)}, { 17.23*4, 32}, 4}, |
| 619 | {{2|(3<<4)}, { 17.23*3, 32}, 0}, | 624 | {{2|(3<<4)}, { 17.23*3, 32}, 4}, |
| 620 | {{2|(2<<4)}, { 17.23*2, 32}, 0}, | 625 | {{2|(2<<4)}, { 17.23*2, 32}, 4}, |
| 621 | {{2|(1<<4)}, { 17.23*1, 32}, 0}, | 626 | {{2|(1<<4)}, { 17.23*1, 32}, 4}, |
| 622 | {{2|(0<<4)}, { 17.23*0, 32}, 1}, | 627 | {{2|(0<<4)}, { 17.23*0, 32}, 1}, |
| 623 | {{3|(13<<4)}, {17.23*13, 48}, 1}, | 628 | {{3|(13<<4)}, {17.23*13, 48}, 1}, |
| 624 | {{3|(11<<4)}, {17.23*11, 48}, 0}, | 629 | {{3|(11<<4)}, {17.23*11, 48}, 4}, |
| 625 | {{3|(10<<4)}, {17.23*10, 48}, 0}, | 630 | {{3|(10<<4)}, {17.23*10, 48}, 4}, |
| 626 | {{3|(9<<4)}, {17.23*9, 48}, 0}, | 631 | {{3|(9<<4)}, {17.23*9, 48}, 4}, |
| 627 | {{3|(8<<4)}, {17.23*8, 48}, 0}, | 632 | {{3|(8<<4)}, {17.23*8, 48}, 4}, |
| 628 | {{3|(7<<4)}, {17.23*7, 48}, 0}, | 633 | {{3|(7<<4)}, {17.23*7, 48}, 4}, |
| 629 | {{3|(6<<4)}, { 17.23*6, 48}, 0}, | 634 | {{3|(6<<4)}, { 17.23*6, 48}, 4}, |
| 630 | {{3|(5<<4)}, { 17.23*5, 48}, 0}, | 635 | {{3|(5<<4)}, { 17.23*5, 48}, 4}, |
| 631 | {{3|(4<<4)}, { 17.23*4, 48}, 0}, | 636 | {{3|(4<<4)}, { 17.23*4, 48}, 4}, |
| 632 | {{3|(3<<4)}, { 17.23*3, 48}, 0}, | 637 | {{3|(3<<4)}, { 17.23*3, 48}, 4}, |
| 633 | {{3|(2<<4)}, { 17.23*2, 48}, 0}, | 638 | {{3|(2<<4)}, { 17.23*2, 48}, 4}, |
| 634 | {{3|(1<<4)}, { 17.23*1, 48}, 0}, | 639 | {{3|(1<<4)}, { 17.23*1, 48}, 4}, |
| 635 | {{3|(0<<4)}, { 17.23*0, 48}, 1}, | 640 | {{3|(0<<4)}, { 17.23*0, 48}, 1}, |
| 636 | {{4|(13<<4)}, {17.23*13, 64}, 1}, | 641 | {{4|(13<<4)}, {17.23*13, 64}, 1}, |
| 637 | {{4|(11<<4)}, {17.23*11, 64}, 1}, | 642 | {{4|(11<<4)}, {17.23*11, 64}, 1}, |
| 638 | {{4|(10<<4)}, {17.23*10, 64}, 1}, | 643 | {{4|(10<<4)}, {17.23*10, 64}, 1}, |
| 639 | {{4|(9<<4)}, {17.23*9, 64}, 1}, | 644 | {{4|(9<<4)}, {17.23*9, 64}, 1}, |
| 640 | {{4|(8<<4)}, {17.23*8, 64}, 1}, | 645 | {{4|(8<<4)}, {17.23*8, 64}, 1}, |
| 641 | {{4|(5<<4)}, { 17.23*5, 64}, 0}, | 646 | {{4|(5<<4)}, { 17.23*5, 64}, 4}, |
| 642 | {{4|(2<<4)}, { 17.23*2, 64}, 1}, | 647 | {{4|(2<<4)}, { 17.23*2, 64}, 1}, |
| 643 | {{4|(1<<4)}, { 17.23*1, 64}, 1}, | 648 | {{4|(1<<4)}, { 17.23*1, 64}, 1}, |
| 644 | {{4|(0<<4)}, { 17.23*0, 64}, 1}, | 649 | {{4|(0<<4)}, { 17.23*0, 64}, 1}, |
diff --git a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c index fcdf29e4e..741fc55fb 100644 --- a/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/ansi/keymap.c | |||
| @@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 42 | rgb_led led; | 42 | rgb_led led; |
| 43 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 43 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 44 | led = g_rgb_leds[i]; | 44 | led = g_rgb_leds[i]; |
| 45 | if (led.matrix_co.raw < 0xFF) { | 45 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 46 | if (led.modifier) { | 46 | rgb_matrix_set_color( i, red, green, blue ); |
| 47 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 48 | } | ||
| 49 | } | 47 | } |
| 50 | } | 48 | } |
| 51 | } | 49 | } |
diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c index 6ba3ac7e6..1f3807c3b 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb/keymap.c | |||
| @@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 43 | rgb_led led; | 43 | rgb_led led; |
| 44 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 44 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 45 | led = g_rgb_leds[i]; | 45 | led = g_rgb_leds[i]; |
| 46 | if (led.matrix_co.raw < 0xFF) { | 46 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 47 | if (led.modifier) { | 47 | rgb_matrix_set_color( i, red, green, blue ); |
| 48 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 49 | } | ||
| 50 | } | 48 | } |
| 51 | } | 49 | } |
| 52 | } | 50 | } |
diff --git a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c index 772eddf07..4575eb19d 100644 --- a/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/hhkb_iso/keymap.c | |||
| @@ -43,10 +43,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 43 | rgb_led led; | 43 | rgb_led led; |
| 44 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 44 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 45 | led = g_rgb_leds[i]; | 45 | led = g_rgb_leds[i]; |
| 46 | if (led.matrix_co.raw < 0xFF) { | 46 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 47 | if (led.modifier) { | 47 | rgb_matrix_set_color( i, red, green, blue ); |
| 48 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 49 | } | ||
| 50 | } | 48 | } |
| 51 | } | 49 | } |
| 52 | } | 50 | } |
diff --git a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c index a78e23703..5e3884803 100644 --- a/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/iso/keymap.c | |||
| @@ -42,10 +42,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 42 | rgb_led led; | 42 | rgb_led led; |
| 43 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 43 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 44 | led = g_rgb_leds[i]; | 44 | led = g_rgb_leds[i]; |
| 45 | if (led.matrix_co.raw < 0xFF) { | 45 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 46 | if (led.modifier) { | 46 | rgb_matrix_set_color( i, red, green, blue ); |
| 47 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 48 | } | ||
| 49 | } | 47 | } |
| 50 | } | 48 | } |
| 51 | } | 49 | } |
diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index 2784f6fa6..3dfa78374 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c | |||
| @@ -56,11 +56,9 @@ void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool defa | |||
| 56 | 56 | ||
| 57 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 57 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 58 | led = g_rgb_leds[i]; | 58 | led = g_rgb_leds[i]; |
| 59 | 59 | ||
| 60 | if (led.matrix_co.raw < 0xFF) { | 60 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 61 | if (led.modifier) { | 61 | rgb_matrix_set_color( i, red, green, blue ); |
| 62 | rgb_matrix_set_color(i, red, green, blue); | ||
| 63 | } | ||
| 64 | } | 62 | } |
| 65 | } | 63 | } |
| 66 | } | 64 | } |
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 6f4ae9fed..13ea84302 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c | |||
| @@ -269,64 +269,64 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 269 | }; | 269 | }; |
| 270 | 270 | ||
| 271 | 271 | ||
| 272 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 272 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 273 | 273 | ||
| 274 | /*{row | col << 4} | 274 | /*{row | col << 4} |
| 275 | | {x=0..224, y=0..64} | 275 | | {x=0..224, y=0..64} |
| 276 | | | modifier | 276 | | | flags |
| 277 | | | | */ | 277 | | | | */ |
| 278 | {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 0}, // LED 1 on right > Key 6 | 278 | {{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6 |
| 279 | {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 0}, // LED 2 > Key 7 | 279 | {{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7 |
| 280 | {{10|(0<<4)}, {17.2*10, 12.8*0}, 0}, // LED 3 > Key 8 | 280 | {{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8 |
| 281 | {{11|(0<<4)}, {17.2*11, 12.8*0}, 0}, // LED 4 > Key 9 | 281 | {{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9 |
| 282 | {{12|(0<<4)}, {17.2*12, 12.8*0}, 0}, // LED 5 > Key 0 | 282 | {{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0 |
| 283 | 283 | ||
| 284 | {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 0}, // LED 6 | 284 | {{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6 |
| 285 | {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 0}, // LED 7 | 285 | {{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7 |
| 286 | {{10|(1<<4)}, {17.2*10, 12.8*1}, 0}, // LED 8 | 286 | {{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8 |
| 287 | {{11|(1<<4)}, {17.2*11, 12.8*1}, 0}, // LED 9 | 287 | {{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9 |
| 288 | {{12|(1<<4)}, {17.2*12, 12.8*1}, 0}, // LED 10 | 288 | {{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10 |
| 289 | 289 | ||
| 290 | {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 0}, // LED 11 | 290 | {{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11 |
| 291 | {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 0}, // LED 12 | 291 | {{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12 |
| 292 | {{10|(2<<4)}, {17.2*10, 12.8*2}, 0}, // LED 13 | 292 | {{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13 |
| 293 | {{11|(2<<4)}, {17.2*11, 12.8*2}, 0}, // LED 14 | 293 | {{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14 |
| 294 | {{12|(2<<4)}, {17.2*12, 12.8*2}, 0}, // LED 15 | 294 | {{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15 |
| 295 | 295 | ||
| 296 | {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 0}, // LED 16 | 296 | {{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16 |
| 297 | {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 0}, // LED 17 | 297 | {{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17 |
| 298 | {{10|(3<<4)}, {17.2*10, 12.8*3}, 0}, // LED 18 | 298 | {{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18 |
| 299 | {{11|(3<<4)}, {17.2*11, 12.8*3}, 0}, // LED 19 | 299 | {{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19 |
| 300 | {{12|(3<<4)}, {17.2*12, 12.8*3}, 0}, // LED 20 | 300 | {{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20 |
| 301 | 301 | ||
| 302 | {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21 | 302 | {{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21 |
| 303 | {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22 | 303 | {{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22 |
| 304 | {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23 | 304 | {{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23 |
| 305 | {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24 | 305 | {{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24 |
| 306 | 306 | ||
| 307 | {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 0}, // LED 1 on left > Key 5 | 307 | {{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5 |
| 308 | {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 0}, // LED 2 > Key 4 | 308 | {{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4 |
| 309 | {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 0}, // LED 3 > Key 3 | 309 | {{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3 |
| 310 | {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 0}, // LED 4 > Key 2 | 310 | {{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2 |
| 311 | {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 0}, // LED 5 > Key 1 | 311 | {{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1 |
| 312 | 312 | ||
| 313 | {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 0}, // LED 6 | 313 | {{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6 |
| 314 | {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 0}, // LED 7 | 314 | {{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7 |
| 315 | {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 0}, // LED 8 | 315 | {{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8 |
| 316 | {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 0}, // LED 9 | 316 | {{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9 |
| 317 | {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 0}, // LED 10 | 317 | {{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10 |
| 318 | 318 | ||
| 319 | {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 0}, // LED 11 | 319 | {{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11 |
| 320 | {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 0}, // LED 12 | 320 | {{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12 |
| 321 | {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 0}, // LED 13 | 321 | {{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13 |
| 322 | {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 0}, // LED 14 | 322 | {{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14 |
| 323 | {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 0}, // LED 15 | 323 | {{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15 |
| 324 | 324 | ||
| 325 | {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 0}, // LED 16 | 325 | {{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16 |
| 326 | {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 0}, // LED 17 | 326 | {{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17 |
| 327 | {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 0}, // LED 18 | 327 | {{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18 |
| 328 | {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 0}, // LED 19 | 328 | {{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19 |
| 329 | {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 0}, // LED 20 | 329 | {{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20 |
| 330 | 330 | ||
| 331 | {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21 | 331 | {{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21 |
| 332 | {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22 | 332 | {{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22 |
diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index d50af86b5..42f879990 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c | |||
| @@ -114,80 +114,80 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 114 | {0, E_16, D_16, F_16}, | 114 | {0, E_16, D_16, F_16}, |
| 115 | {0, B_16, A_16, C_16}, | 115 | {0, B_16, A_16, C_16}, |
| 116 | }; | 116 | }; |
| 117 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 117 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 118 | /* {row | col << 4} | 118 | /* {row | col << 4} |
| 119 | * | {x=0..224, y=0..64} | 119 | * | {x=0..224, y=0..64} |
| 120 | * | | modifier | 120 | * | | flags |
| 121 | * | | | */ | 121 | * | | | */ |
| 122 | //cs1 | 122 | //cs1 |
| 123 | {{0|(0<<4)}, { 0, 0}, 1}, | 123 | {{0|(0<<4)}, { 0, 0}, 1}, |
| 124 | {{0|(1<<4)}, { 17, 0}, 0}, | 124 | {{0|(1<<4)}, { 17, 0}, 4}, |
| 125 | {{1|(0<<4)}, { 0, 16}, 1}, | 125 | {{1|(0<<4)}, { 0, 16}, 1}, |
| 126 | {{2|(0<<4)}, { 0, 32}, 1}, | 126 | {{2|(0<<4)}, { 0, 32}, 1}, |
| 127 | 127 | ||
| 128 | //cs2 | 128 | //cs2 |
| 129 | {{0|(2<<4)}, { 34, 0}, 0}, | 129 | {{0|(2<<4)}, { 34, 0}, 4}, |
| 130 | {{0|(3<<4)}, { 51, 0}, 0}, | 130 | {{0|(3<<4)}, { 51, 0}, 4}, |
| 131 | {{1|(1<<4)}, { 17, 16}, 0}, | 131 | {{1|(1<<4)}, { 17, 16}, 4}, |
| 132 | {{1|(2<<4)}, { 34, 16}, 0}, | 132 | {{1|(2<<4)}, { 34, 16}, 4}, |
| 133 | //cs3 | 133 | //cs3 |
| 134 | {{2|(1<<4)}, { 17, 32}, 0}, | 134 | {{2|(1<<4)}, { 17, 32}, 4}, |
| 135 | {{2|(2<<4)}, { 34, 32}, 0}, | 135 | {{2|(2<<4)}, { 34, 32}, 4}, |
| 136 | {{3|(1<<4)}, { 17, 48}, 0}, | 136 | {{3|(1<<4)}, { 17, 48}, 4}, |
| 137 | {{3|(2<<4)}, { 34, 48}, 0}, | 137 | {{3|(2<<4)}, { 34, 48}, 4}, |
| 138 | //cs4 | 138 | //cs4 |
| 139 | {{0|(4<<4)}, { 68, 0}, 0}, | 139 | {{0|(4<<4)}, { 68, 0}, 4}, |
| 140 | {{0|(5<<4)}, { 85, 0}, 0}, | 140 | {{0|(5<<4)}, { 85, 0}, 4}, |
| 141 | {{1|(3<<4)}, { 51, 16}, 0}, | 141 | {{1|(3<<4)}, { 51, 16}, 4}, |
| 142 | {{1|(4<<4)}, { 68, 16}, 0}, | 142 | {{1|(4<<4)}, { 68, 16}, 4}, |
| 143 | //cs5 | 143 | //cs5 |
| 144 | {{0|(11<<4)}, {187, 0}, 0}, | 144 | {{0|(11<<4)}, {187, 0}, 4}, |
| 145 | {{0|(12<<4)}, {204, 0}, 0}, | 145 | {{0|(12<<4)}, {204, 0}, 4}, |
| 146 | {{1|(11<<4)}, {187, 16}, 0}, | 146 | {{1|(11<<4)}, {187, 16}, 4}, |
| 147 | {{1|(12<<4)}, {204, 16}, 0}, | 147 | {{1|(12<<4)}, {204, 16}, 4}, |
| 148 | //cs6 | 148 | //cs6 |
| 149 | {{0|(7<<4)}, {119, 0}, 0}, | 149 | {{0|(7<<4)}, {119, 0}, 4}, |
| 150 | {{0|(8<<4)}, {136, 0}, 0}, | 150 | {{0|(8<<4)}, {136, 0}, 4}, |
| 151 | {{1|(7<<4)}, {119, 16}, 0}, | 151 | {{1|(7<<4)}, {119, 16}, 4}, |
| 152 | {{1|(8<<4)}, {136, 16}, 0}, | 152 | {{1|(8<<4)}, {136, 16}, 4}, |
| 153 | //cs7 | 153 | //cs7 |
| 154 | {{0|(9<<4)}, {153, 0}, 0}, | 154 | {{0|(9<<4)}, {153, 0}, 4}, |
| 155 | {{0|(10<<4)}, {170, 0}, 0}, | 155 | {{0|(10<<4)}, {170, 0}, 4}, |
| 156 | {{1|(9<<4)}, {153, 16}, 0}, | 156 | {{1|(9<<4)}, {153, 16}, 4}, |
| 157 | {{1|(10<<4)}, {170, 16}, 0}, | 157 | {{1|(10<<4)}, {170, 16}, 4}, |
| 158 | //cs8 | 158 | //cs8 |
| 159 | {{0|(13<<4)}, {221, 0}, 0}, | 159 | {{0|(13<<4)}, {221, 0}, 4}, |
| 160 | {{0|(14<<4)}, {221, 0}, 0}, | 160 | {{0|(14<<4)}, {221, 0}, 4}, |
| 161 | {{1|(13<<4)}, {221, 32}, 1}, | 161 | {{1|(13<<4)}, {221, 32}, 1}, |
| 162 | {{2|(12<<4)}, {221, 16}, 1}, | 162 | {{2|(12<<4)}, {221, 16}, 1}, |
| 163 | //cs9 | 163 | //cs9 |
| 164 | {{2|(3<<4)}, { 51, 32}, 0}, | 164 | {{2|(3<<4)}, { 51, 32}, 4}, |
| 165 | {{2|(4<<4)}, { 68, 32}, 0}, | 165 | {{2|(4<<4)}, { 68, 32}, 4}, |
| 166 | {{3|(3<<4)}, { 51, 48}, 0}, | 166 | {{3|(3<<4)}, { 51, 48}, 4}, |
| 167 | {{3|(4<<4)}, { 68, 48}, 0}, | 167 | {{3|(4<<4)}, { 68, 48}, 4}, |
| 168 | //cs10 | 168 | //cs10 |
| 169 | {{0|(6<<4)}, {102, 0}, 0}, | 169 | {{0|(6<<4)}, {102, 0}, 4}, |
| 170 | {{1|(5<<4)}, { 85, 16}, 0}, | 170 | {{1|(5<<4)}, { 85, 16}, 4}, |
| 171 | {{1|(6<<4)}, {102, 16}, 0}, | 171 | {{1|(6<<4)}, {102, 16}, 4}, |
| 172 | {{2|(5<<4)}, { 85, 32}, 0}, | 172 | {{2|(5<<4)}, { 85, 32}, 4}, |
| 173 | //cs11 | 173 | //cs11 |
| 174 | {{2|(6<<4)}, {102, 32}, 0}, | 174 | {{2|(6<<4)}, {102, 32}, 4}, |
| 175 | {{3|(5<<4)}, { 85, 48}, 0}, | 175 | {{3|(5<<4)}, { 85, 48}, 4}, |
| 176 | {{3|(6<<4)}, {102, 48}, 0}, | 176 | {{3|(6<<4)}, {102, 48}, 4}, |
| 177 | {{4|(5<<4)}, {102, 64}, 0}, | 177 | {{4|(5<<4)}, {102, 64}, 4}, |
| 178 | //cs12 | 178 | //cs12 |
| 179 | {{2|(7<<4)}, {119, 32}, 0}, | 179 | {{2|(7<<4)}, {119, 32}, 4}, |
| 180 | {{2|(8<<4)}, {136, 32}, 0}, | 180 | {{2|(8<<4)}, {136, 32}, 4}, |
| 181 | {{3|(7<<4)}, {119, 48}, 0}, | 181 | {{3|(7<<4)}, {119, 48}, 4}, |
| 182 | {{3|(8<<4)}, {136, 48}, 0}, | 182 | {{3|(8<<4)}, {136, 48}, 4}, |
| 183 | //cs13 | 183 | //cs13 |
| 184 | {{2|(9<<4)}, {153, 32}, 0}, | 184 | {{2|(9<<4)}, {153, 32}, 4}, |
| 185 | {{2|(10<<4)}, {170, 32}, 0}, | 185 | {{2|(10<<4)}, {170, 32}, 4}, |
| 186 | {{3|(9<<4)}, {153, 48}, 0}, | 186 | {{3|(9<<4)}, {153, 48}, 4}, |
| 187 | {{4|(6<<4)}, {136, 48}, 1}, | 187 | {{4|(6<<4)}, {136, 48}, 1}, |
| 188 | //cs14 | 188 | //cs14 |
| 189 | {{2|(11<<4)}, {187, 32}, 0}, | 189 | {{2|(11<<4)}, {187, 32}, 4}, |
| 190 | {{3|(10<<4)}, {170, 48}, 0}, | 190 | {{3|(10<<4)}, {170, 48}, 4}, |
| 191 | {{3|(11<<4)}, {187, 48}, 1}, | 191 | {{3|(11<<4)}, {187, 48}, 1}, |
| 192 | {{4|(7<<4)}, {153, 48}, 1}, | 192 | {{4|(7<<4)}, {153, 48}, 1}, |
| 193 | //cs15 | 193 | //cs15 |
diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index e99ed11a7..5827b42e2 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c | |||
| @@ -21,21 +21,21 @@ | |||
| 21 | #ifdef RGB_MATRIX_ENABLE | 21 | #ifdef RGB_MATRIX_ENABLE |
| 22 | #include "rgblight.h" | 22 | #include "rgblight.h" |
| 23 | 23 | ||
| 24 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 24 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 25 | /*{row | col << 4} | 25 | /*{row | col << 4} |
| 26 | | {x=0..224, y=0..64} | 26 | | {x=0..224, y=0..64} |
| 27 | | | modifier | 27 | | | modifier |
| 28 | | | | */ | 28 | | | | */ |
| 29 | {{1|(13<<4)}, {195, 3}, 0}, | 29 | {{1|(13<<4)}, {195, 3}, 4}, |
| 30 | {{4|(13<<4)}, {195, 16}, 0}, | 30 | {{4|(13<<4)}, {195, 16}, 4}, |
| 31 | {{4|(10<<4)}, {150, 16}, 0}, | 31 | {{4|(10<<4)}, {150, 16}, 4}, |
| 32 | {{4|(7<<4)}, {105, 16}, 0}, | 32 | {{4|(7<<4)}, {105, 16}, 4}, |
| 33 | {{4|(4<<4)}, {60, 16}, 0}, | 33 | {{4|(4<<4)}, {60, 16}, 4}, |
| 34 | {{4|(1<<4)}, {15, 16}, 0}, | 34 | {{4|(1<<4)}, {15, 16}, 4}, |
| 35 | {{1|(1<<4)}, {15, 3}, 0}, | 35 | {{1|(1<<4)}, {15, 3}, 4}, |
| 36 | {{1|(4<<4)}, {60, 3}, 0}, | 36 | {{1|(4<<4)}, {60, 3}, 4}, |
| 37 | {{1|(7<<4)}, {105, 3}, 0}, | 37 | {{1|(7<<4)}, {105, 3}, 4}, |
| 38 | {{1|(10<<4)}, {150, 3}, 0} | 38 | {{1|(10<<4)}, {150, 3}, 4} |
| 39 | }; | 39 | }; |
| 40 | 40 | ||
| 41 | #endif | 41 | #endif |
diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 882611030..bd6dd19b2 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c | |||
| @@ -165,7 +165,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 165 | {1, C9_16, C7_15, C6_15} //D16 | 165 | {1, C9_16, C7_15, C6_15} //D16 |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 168 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 169 | // | 169 | // |
| 170 | // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, | 170 | // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, |
| 171 | // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, | 171 | // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, |
| @@ -174,70 +174,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 174 | // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 | 174 | // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 |
| 175 | /* {row | col << 4} | 175 | /* {row | col << 4} |
| 176 | * | {x=0..224, y=0..64} | 176 | * | {x=0..224, y=0..64} |
| 177 | * | | modifier | 177 | * | | flags |
| 178 | * | | | */ | 178 | * | | | */ |
| 179 | {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 | 179 | {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 |
| 180 | {{0|(12<<4)}, {204, 0}, 0}, | 180 | {{0|(12<<4)}, {204, 0}, 4}, |
| 181 | {{0|(11<<4)}, {187, 0}, 0}, | 181 | {{0|(11<<4)}, {187, 0}, 4}, |
| 182 | {{0|(10<<4)}, {170, 0}, 0}, | 182 | {{0|(10<<4)}, {170, 0}, 4}, |
| 183 | {{0|(9<<4)}, {153, 0}, 0}, | 183 | {{0|(9<<4)}, {153, 0}, 4}, |
| 184 | {{0|(8<<4)}, {136, 0}, 0}, | 184 | {{0|(8<<4)}, {136, 0}, 4}, |
| 185 | {{0|(7<<4)}, {119, 0}, 0}, | 185 | {{0|(7<<4)}, {119, 0}, 4}, |
| 186 | {{1|(7<<4)}, {119, 16}, 0}, | 186 | {{1|(7<<4)}, {119, 16}, 4}, |
| 187 | {{1|(8<<4)}, {136, 16}, 0}, | 187 | {{1|(8<<4)}, {136, 16}, 4}, |
| 188 | {{1|(9<<4)}, {153, 16}, 0}, | 188 | {{1|(9<<4)}, {153, 16}, 4}, |
| 189 | {{1|(10<<4)}, {170, 16}, 0}, | 189 | {{1|(10<<4)}, {170, 16}, 4}, |
| 190 | {{1|(11<<4)}, {187, 16}, 0}, | 190 | {{1|(11<<4)}, {187, 16}, 4}, |
| 191 | {{1|(12<<4)}, {204, 16}, 0}, | 191 | {{1|(12<<4)}, {204, 16}, 4}, |
| 192 | {{2|(13<<4)}, {224, 32}, 1}, | 192 | {{2|(13<<4)}, {224, 32}, 1}, |
| 193 | {{2|(12<<4)}, {224, 16}, 0}, | 193 | {{2|(12<<4)}, {224, 16}, 4}, |
| 194 | {{2|(11<<4)}, {197, 32}, 0}, | 194 | {{2|(11<<4)}, {197, 32}, 4}, |
| 195 | 195 | ||
| 196 | {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 | 196 | {{3|(10<<4)}, {170, 48}, 4}, //B1-B14 |
| 197 | {{3|(9<<4)}, {153, 48}, 0}, | 197 | {{3|(9<<4)}, {153, 48}, 4}, |
| 198 | {{3|(8<<4)}, {136, 48}, 0}, | 198 | {{3|(8<<4)}, {136, 48}, 4}, |
| 199 | {{3|(7<<4)}, {119, 48}, 0}, | 199 | {{3|(7<<4)}, {119, 48}, 4}, |
| 200 | {{2|(7<<4)}, {119, 32}, 0}, | 200 | {{2|(7<<4)}, {119, 32}, 4}, |
| 201 | {{2|(8<<4)}, {136, 32}, 0}, | 201 | {{2|(8<<4)}, {136, 32}, 4}, |
| 202 | {{2|(9<<4)}, {153, 32}, 0}, | 202 | {{2|(9<<4)}, {153, 32}, 4}, |
| 203 | {{2|(10<<4)}, {170, 32}, 0}, | 203 | {{2|(10<<4)}, {170, 32}, 4}, |
| 204 | {{3|(11<<4)}, {187, 48}, 0}, | 204 | {{3|(11<<4)}, {187, 48}, 4}, |
| 205 | {{3|(13<<4)}, {214, 48}, 1}, | 205 | {{3|(13<<4)}, {214, 48}, 1}, |
| 206 | {{4|(13<<4)}, {224, 64}, 1}, | 206 | {{4|(13<<4)}, {224, 64}, 1}, |
| 207 | {{4|(12<<4)}, {204, 64}, 1}, | 207 | {{4|(12<<4)}, {204, 64}, 1}, |
| 208 | {{4|(11<<4)}, {187, 64}, 1}, | 208 | {{4|(11<<4)}, {187, 64}, 1}, |
| 209 | {{4|(10<<4)}, {170, 64}, 1}, | 209 | {{4|(10<<4)}, {170, 64}, 1}, |
| 210 | 210 | ||
| 211 | {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 | 211 | {{0|(6<<4)}, {102, 0}, 4}, //C1-C16 |
| 212 | {{0|(5<<4)}, { 85, 0}, 0}, | 212 | {{0|(5<<4)}, { 85, 0}, 4}, |
| 213 | {{0|(4<<4)}, { 68, 0}, 0}, | 213 | {{0|(4<<4)}, { 68, 0}, 4}, |
| 214 | {{0|(3<<4)}, { 51, 0}, 0}, | 214 | {{0|(3<<4)}, { 51, 0}, 4}, |
| 215 | {{0|(2<<4)}, { 34, 0}, 0}, | 215 | {{0|(2<<4)}, { 34, 0}, 4}, |
| 216 | {{0|(1<<4)}, { 17, 0}, 0}, | 216 | {{0|(1<<4)}, { 17, 0}, 4}, |
| 217 | {{0|(0<<4)}, { 0, 0}, 1}, | 217 | {{0|(0<<4)}, { 0, 0}, 1}, |
| 218 | {{1|(0<<4)}, { 0, 16}, 1}, | 218 | {{1|(0<<4)}, { 0, 16}, 1}, |
| 219 | {{1|(1<<4)}, { 17, 16}, 0}, | 219 | {{1|(1<<4)}, { 17, 16}, 4}, |
| 220 | {{1|(2<<4)}, { 34, 16}, 0}, | 220 | {{1|(2<<4)}, { 34, 16}, 4}, |
| 221 | {{1|(3<<4)}, { 51, 16}, 0}, | 221 | {{1|(3<<4)}, { 51, 16}, 4}, |
| 222 | {{1|(4<<4)}, { 68, 16}, 0}, | 222 | {{1|(4<<4)}, { 68, 16}, 4}, |
| 223 | {{1|(5<<4)}, { 85, 16}, 0}, | 223 | {{1|(5<<4)}, { 85, 16}, 4}, |
| 224 | {{1|(6<<4)}, {102, 16}, 0}, | 224 | {{1|(6<<4)}, {102, 16}, 4}, |
| 225 | {{2|(6<<4)}, {102, 32}, 0}, | 225 | {{2|(6<<4)}, {102, 32}, 4}, |
| 226 | {{2|(5<<4)}, { 85, 32}, 0}, | 226 | {{2|(5<<4)}, { 85, 32}, 4}, |
| 227 | 227 | ||
| 228 | {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 | 228 | {{3|(2<<4)}, { 32, 48}, 4}, //D1-D16 |
| 229 | //D2 | 229 | //D2 |
| 230 | {{3|(0<<4)}, { 10, 48}, 1}, | 230 | {{3|(0<<4)}, { 10, 48}, 1}, |
| 231 | {{2|(0<<4)}, { 0, 32}, 1}, | 231 | {{2|(0<<4)}, { 0, 32}, 1}, |
| 232 | {{2|(1<<4)}, { 17, 32}, 0}, | 232 | {{2|(1<<4)}, { 17, 32}, 4}, |
| 233 | {{2|(2<<4)}, { 34, 32}, 0}, | 233 | {{2|(2<<4)}, { 34, 32}, 4}, |
| 234 | {{2|(3<<4)}, { 51, 32}, 0}, | 234 | {{2|(3<<4)}, { 51, 32}, 4}, |
| 235 | {{2|(4<<4)}, { 68, 32}, 0}, | 235 | {{2|(4<<4)}, { 68, 32}, 4}, |
| 236 | {{3|(3<<4)}, { 51, 48}, 0}, | 236 | {{3|(3<<4)}, { 51, 48}, 4}, |
| 237 | {{3|(4<<4)}, { 68, 48}, 0}, | 237 | {{3|(4<<4)}, { 68, 48}, 4}, |
| 238 | {{3|(5<<4)}, { 85, 48}, 0}, | 238 | {{3|(5<<4)}, { 85, 48}, 4}, |
| 239 | {{3|(6<<4)}, {102, 48}, 0}, | 239 | {{3|(6<<4)}, {102, 48}, 4}, |
| 240 | {{4|(3<<4)}, {102, 64}, 0}, | 240 | {{4|(3<<4)}, {102, 64}, 4}, |
| 241 | {{4|(2<<4)}, { 34, 68}, 1}, | 241 | {{4|(2<<4)}, { 34, 68}, 1}, |
| 242 | {{4|(1<<4)}, { 17, 68}, 1}, | 242 | {{4|(1<<4)}, { 17, 68}, 1}, |
| 243 | {{4|(0<<4)}, { 0, 68}, 1} | 243 | {{4|(0<<4)}, { 0, 68}, 1} |
| @@ -319,7 +319,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 319 | {1, C9_16, C7_15, C6_15} //D16 | 319 | {1, C9_16, C7_15, C6_15} //D16 |
| 320 | }; | 320 | }; |
| 321 | 321 | ||
| 322 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 322 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 323 | // | 323 | // |
| 324 | // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, | 324 | // C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, |
| 325 | // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, | 325 | // C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, |
| @@ -328,70 +328,70 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 328 | // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 | 328 | // D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 |
| 329 | /* {row | col << 4} | 329 | /* {row | col << 4} |
| 330 | * | {x=0..224, y=0..64} | 330 | * | {x=0..224, y=0..64} |
| 331 | * | | modifier | 331 | * | | flags |
| 332 | * | | | */ | 332 | * | | | */ |
| 333 | {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 | 333 | {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 |
| 334 | {{0|(12<<4)}, {204, 0}, 0}, | 334 | {{0|(12<<4)}, {204, 0}, 4}, |
| 335 | {{0|(11<<4)}, {187, 0}, 0}, | 335 | {{0|(11<<4)}, {187, 0}, 4}, |
| 336 | {{0|(10<<4)}, {170, 0}, 0}, | 336 | {{0|(10<<4)}, {170, 0}, 4}, |
| 337 | {{0|(9<<4)}, {153, 0}, 0}, | 337 | {{0|(9<<4)}, {153, 0}, 4}, |
| 338 | {{0|(8<<4)}, {136, 0}, 0}, | 338 | {{0|(8<<4)}, {136, 0}, 4}, |
| 339 | {{0|(7<<4)}, {119, 0}, 0}, | 339 | {{0|(7<<4)}, {119, 0}, 4}, |
| 340 | {{1|(7<<4)}, {119, 16}, 0}, | 340 | {{1|(7<<4)}, {119, 16}, 4}, |
| 341 | {{1|(8<<4)}, {136, 16}, 0}, | 341 | {{1|(8<<4)}, {136, 16}, 4}, |
| 342 | {{1|(9<<4)}, {153, 16}, 0}, | 342 | {{1|(9<<4)}, {153, 16}, 4}, |
| 343 | {{1|(10<<4)}, {170, 16}, 0}, | 343 | {{1|(10<<4)}, {170, 16}, 4}, |
| 344 | {{1|(11<<4)}, {187, 16}, 0}, | 344 | {{1|(11<<4)}, {187, 16}, 4}, |
| 345 | {{1|(12<<4)}, {204, 16}, 0}, | 345 | {{1|(12<<4)}, {204, 16}, 4}, |
| 346 | {{2|(13<<4)}, {224, 8}, 1}, | 346 | {{2|(13<<4)}, {224, 8}, 1}, |
| 347 | {{2|(12<<4)}, {204, 32}, 0}, | 347 | {{2|(12<<4)}, {204, 32}, 4}, |
| 348 | {{2|(11<<4)}, {187, 32}, 0}, | 348 | {{2|(11<<4)}, {187, 32}, 4}, |
| 349 | 349 | ||
| 350 | {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 | 350 | {{3|(10<<4)}, {170, 48}, 4}, //B1-B14 |
| 351 | {{3|(9<<4)}, {153, 48}, 0}, | 351 | {{3|(9<<4)}, {153, 48}, 4}, |
| 352 | {{3|(8<<4)}, {136, 48}, 0}, | 352 | {{3|(8<<4)}, {136, 48}, 4}, |
| 353 | {{3|(7<<4)}, {119, 48}, 0}, | 353 | {{3|(7<<4)}, {119, 48}, 4}, |
| 354 | {{2|(7<<4)}, {119, 32}, 0}, | 354 | {{2|(7<<4)}, {119, 32}, 4}, |
| 355 | {{2|(8<<4)}, {136, 32}, 0}, | 355 | {{2|(8<<4)}, {136, 32}, 4}, |
| 356 | {{2|(9<<4)}, {153, 32}, 0}, | 356 | {{2|(9<<4)}, {153, 32}, 4}, |
| 357 | {{2|(10<<4)}, {170, 32}, 0}, | 357 | {{2|(10<<4)}, {170, 32}, 4}, |
| 358 | {{3|(11<<4)}, {187, 48}, 0}, | 358 | {{3|(11<<4)}, {187, 48}, 4}, |
| 359 | {{3|(13<<4)}, {214, 48}, 1}, | 359 | {{3|(13<<4)}, {214, 48}, 1}, |
| 360 | {{4|(13<<4)}, {224, 64}, 1}, | 360 | {{4|(13<<4)}, {224, 64}, 1}, |
| 361 | {{4|(12<<4)}, {204, 64}, 1}, | 361 | {{4|(12<<4)}, {204, 64}, 1}, |
| 362 | {{4|(11<<4)}, {187, 64}, 1}, | 362 | {{4|(11<<4)}, {187, 64}, 1}, |
| 363 | {{4|(10<<4)}, {170, 64}, 1}, | 363 | {{4|(10<<4)}, {170, 64}, 1}, |
| 364 | 364 | ||
| 365 | {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 | 365 | {{0|(6<<4)}, {102, 0}, 4}, //C1-C16 |
| 366 | {{0|(5<<4)}, { 85, 0}, 0}, | 366 | {{0|(5<<4)}, { 85, 0}, 4}, |
| 367 | {{0|(4<<4)}, { 68, 0}, 0}, | 367 | {{0|(4<<4)}, { 68, 0}, 4}, |
| 368 | {{0|(3<<4)}, { 51, 0}, 0}, | 368 | {{0|(3<<4)}, { 51, 0}, 4}, |
| 369 | {{0|(2<<4)}, { 34, 0}, 0}, | 369 | {{0|(2<<4)}, { 34, 0}, 4}, |
| 370 | {{0|(1<<4)}, { 17, 0}, 0}, | 370 | {{0|(1<<4)}, { 17, 0}, 4}, |
| 371 | {{0|(0<<4)}, { 0, 0}, 1}, | 371 | {{0|(0<<4)}, { 0, 0}, 1}, |
| 372 | {{1|(0<<4)}, { 0, 16}, 1}, | 372 | {{1|(0<<4)}, { 0, 16}, 1}, |
| 373 | {{1|(1<<4)}, { 17, 16}, 0}, | 373 | {{1|(1<<4)}, { 17, 16}, 4}, |
| 374 | {{1|(2<<4)}, { 34, 16}, 0}, | 374 | {{1|(2<<4)}, { 34, 16}, 4}, |
| 375 | {{1|(3<<4)}, { 51, 16}, 0}, | 375 | {{1|(3<<4)}, { 51, 16}, 4}, |
| 376 | {{1|(4<<4)}, { 68, 16}, 0}, | 376 | {{1|(4<<4)}, { 68, 16}, 4}, |
| 377 | {{1|(5<<4)}, { 85, 16}, 0}, | 377 | {{1|(5<<4)}, { 85, 16}, 4}, |
| 378 | {{1|(6<<4)}, {102, 16}, 0}, | 378 | {{1|(6<<4)}, {102, 16}, 4}, |
| 379 | {{2|(6<<4)}, {102, 32}, 0}, | 379 | {{2|(6<<4)}, {102, 32}, 4}, |
| 380 | {{2|(5<<4)}, { 85, 32}, 0}, | 380 | {{2|(5<<4)}, { 85, 32}, 4}, |
| 381 | 381 | ||
| 382 | {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 | 382 | {{3|(2<<4)}, { 32, 48}, 4}, //D1-D16 |
| 383 | {{3|(1<<4)}, { 17, 48}, 0}, | 383 | {{3|(1<<4)}, { 17, 48}, 4}, |
| 384 | {{3|(0<<4)}, { 0, 48}, 1}, | 384 | {{3|(0<<4)}, { 0, 48}, 1}, |
| 385 | {{2|(0<<4)}, { 0, 32}, 1}, | 385 | {{2|(0<<4)}, { 0, 32}, 1}, |
| 386 | {{2|(1<<4)}, { 17, 32}, 0}, | 386 | {{2|(1<<4)}, { 17, 32}, 4}, |
| 387 | {{2|(2<<4)}, { 34, 32}, 0}, | 387 | {{2|(2<<4)}, { 34, 32}, 4}, |
| 388 | {{2|(3<<4)}, { 51, 32}, 0}, | 388 | {{2|(3<<4)}, { 51, 32}, 4}, |
| 389 | {{2|(4<<4)}, { 68, 32}, 0}, | 389 | {{2|(4<<4)}, { 68, 32}, 4}, |
| 390 | {{3|(3<<4)}, { 51, 48}, 0}, | 390 | {{3|(3<<4)}, { 51, 48}, 4}, |
| 391 | {{3|(4<<4)}, { 68, 48}, 0}, | 391 | {{3|(4<<4)}, { 68, 48}, 4}, |
| 392 | {{3|(5<<4)}, { 85, 48}, 0}, | 392 | {{3|(5<<4)}, { 85, 48}, 4}, |
| 393 | {{3|(6<<4)}, {102, 48}, 0}, | 393 | {{3|(6<<4)}, {102, 48}, 4}, |
| 394 | {{4|(3<<4)}, {102, 64}, 0}, | 394 | {{4|(3<<4)}, {102, 64}, 4}, |
| 395 | {{4|(2<<4)}, { 34, 68}, 1}, | 395 | {{4|(2<<4)}, { 34, 68}, 1}, |
| 396 | {{4|(1<<4)}, { 17, 68}, 1}, | 396 | {{4|(1<<4)}, { 17, 68}, 1}, |
| 397 | {{4|(0<<4)}, { 0, 68}, 1} | 397 | {{4|(0<<4)}, { 0, 68}, 1} |
diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index f63c38bf6..59e66e133 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h | |||
| @@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 123 | #define RGB_MATRIX_KEYPRESSES | 123 | #define RGB_MATRIX_KEYPRESSES |
| 124 | #define RGB_MATRIX_LED_PROCESS_LIMIT 15 | 124 | #define RGB_MATRIX_LED_PROCESS_LIMIT 15 |
| 125 | #define RGB_MATRIX_LED_FLUSH_LIMIT 10 | 125 | #define RGB_MATRIX_LED_FLUSH_LIMIT 10 |
| 126 | #define RGB_MATRIX_EXTRA_TOG | ||
| 127 | 126 | ||
| 128 | #include "config_led.h" | 127 | #include "config_led.h" |
diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 7d98e47c9..1a9a539a0 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c | |||
| @@ -20,122 +20,122 @@ | |||
| 20 | // | 20 | // |
| 21 | // There is a quick-and-dirty implementation of this under ledvis.html | 21 | // There is a quick-and-dirty implementation of this under ledvis.html |
| 22 | 22 | ||
| 23 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 23 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 24 | /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 0 }, // KC_ESC | 24 | /* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC |
| 25 | /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 0 }, // KC_1 | 25 | /* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1 |
| 26 | /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 0 }, // KC_2 | 26 | /* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2 |
| 27 | /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 0 }, // KC_3 | 27 | /* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3 |
| 28 | /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 0 }, // KC_4 | 28 | /* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4 |
| 29 | /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 0 }, // KC_5 | 29 | /* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5 |
| 30 | /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 0 }, // KC_6 | 30 | /* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6 |
| 31 | /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 0 }, // KC_7 | 31 | /* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7 |
| 32 | /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 0 }, // KC_8 | 32 | /* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8 |
| 33 | /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 0 }, // KC_9 | 33 | /* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9 |
| 34 | /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 0 }, // KC_0 | 34 | /* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0 |
| 35 | /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 0 }, // KC_MINS | 35 | /* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS |
| 36 | /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 0 }, // KC_EQL | 36 | /* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL |
| 37 | /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 0 }, // KC_BSPC | 37 | /* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC |
| 38 | /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 0 }, // KC_DEL | 38 | /* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL |
| 39 | /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 0 }, // KC_TAB | 39 | /* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB |
| 40 | /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 0 }, // KC_Q | 40 | /* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q |
| 41 | /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 0 }, // KC_W | 41 | /* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W |
| 42 | /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 0 }, // KC_E | 42 | /* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E |
| 43 | /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 0 }, // KC_R | 43 | /* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R |
| 44 | /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 0 }, // KC_T | 44 | /* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T |
| 45 | /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 0 }, // KC_Y | 45 | /* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y |
| 46 | /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 0 }, // KC_U | 46 | /* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U |
| 47 | /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 0 }, // KC_I | 47 | /* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I |
| 48 | /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 0 }, // KC_O | 48 | /* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O |
| 49 | /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 0 }, // KC_P | 49 | /* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P |
| 50 | /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 0 }, // KC_LBRC | 50 | /* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC |
| 51 | /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 0 }, // KC_RBRC | 51 | /* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC |
| 52 | /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 0 }, // KC_BSLS | 52 | /* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS |
| 53 | /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 0 }, // KC_HOME | 53 | /* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME |
| 54 | /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS | 54 | /* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS |
| 55 | /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 0 }, // KC_A | 55 | /* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A |
| 56 | /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 0 }, // KC_S | 56 | /* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S |
| 57 | /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 0 }, // KC_D | 57 | /* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D |
| 58 | /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 0 }, // KC_F | 58 | /* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F |
| 59 | /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 0 }, // KC_G | 59 | /* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G |
| 60 | /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 0 }, // KC_H | 60 | /* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H |
| 61 | /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 0 }, // KC_J | 61 | /* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J |
| 62 | /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 0 }, // KC_K | 62 | /* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K |
| 63 | /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 0 }, // KC_L | 63 | /* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L |
| 64 | /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 0 }, // KC_SCLN | 64 | /* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN |
| 65 | /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 0 }, // KC_QUOT | 65 | /* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT |
| 66 | /* _________________________________________ */ // ____ | 66 | /* _________________________________________ */ // ____ |
| 67 | /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 0 }, // KC_ENT | 67 | /* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT |
| 68 | /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 0 }, // KC_PGUP | 68 | /* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP |
| 69 | /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 0 }, // KC_LSFT | 69 | /* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT |
| 70 | /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 0 }, // KC_Z | 70 | /* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z |
| 71 | /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 0 }, // KC_X | 71 | /* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X |
| 72 | /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 0 }, // KC_C | 72 | /* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C |
| 73 | /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 0 }, // KC_V | 73 | /* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V |
| 74 | /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 0 }, // KC_B | 74 | /* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B |
| 75 | /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 0 }, // KC_N | 75 | /* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N |
| 76 | /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 0 }, // KC_M | 76 | /* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M |
| 77 | /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 0 }, // KC_COMM | 77 | /* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM |
| 78 | /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 0 }, // KC_DOT | 78 | /* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT |
| 79 | /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 0 }, // KC_SLSH | 79 | /* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH |
| 80 | /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 0 }, // KC_RSFT | 80 | /* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT |
| 81 | /* _________________________________________ */ // ____ | 81 | /* _________________________________________ */ // ____ |
| 82 | /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 0 }, // KC_UP | 82 | /* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP |
| 83 | /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 0 }, // KC_PGDN | 83 | /* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN |
| 84 | /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 0 }, // KC_LCTL | 84 | /* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL |
| 85 | /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 0 }, // KC_LGUI | 85 | /* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI |
| 86 | /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 0 }, // KC_LALT | 86 | /* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT |
| 87 | /* _________________________________________ */ // ____ | 87 | /* _________________________________________ */ // ____ |
| 88 | /* _________________________________________ */ // ____ | 88 | /* _________________________________________ */ // ____ |
| 89 | /* _________________________________________ */ // ____ | 89 | /* _________________________________________ */ // ____ |
| 90 | /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 0 }, // KC_SPC | 90 | /* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC |
| 91 | /* _________________________________________ */ // ____ | 91 | /* _________________________________________ */ // ____ |
| 92 | /* _________________________________________ */ // ____ | 92 | /* _________________________________________ */ // ____ |
| 93 | /* _________________________________________ */ // ____ | 93 | /* _________________________________________ */ // ____ |
| 94 | /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 0 }, // KC_RALT | 94 | /* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT |
| 95 | /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 0 }, // MO(1) | 95 | /* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1) |
| 96 | /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 0 }, // KC_LEFT | 96 | /* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT |
| 97 | /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 0 }, // KC_DOWN | 97 | /* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN |
| 98 | /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 0 }, // KC_RGHT | 98 | /* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT |
| 99 | 99 | ||
| 100 | // Underglow LEDs | 100 | // Underglow LEDs |
| 101 | { { 255 }, { 1, 1 }, 0 }, | 101 | { { 255 }, { 1, 1 }, 2 }, |
| 102 | { { 255 }, { 15, 0 }, 0 }, | 102 | { { 255 }, { 15, 0 }, 2 }, |
| 103 | { { 255 }, { 31, 0 }, 0 }, | 103 | { { 255 }, { 31, 0 }, 2 }, |
| 104 | { { 255 }, { 47, 0 }, 0 }, | 104 | { { 255 }, { 47, 0 }, 2 }, |
| 105 | { { 255 }, { 63, 0 }, 0 }, | 105 | { { 255 }, { 63, 0 }, 2 }, |
| 106 | { { 255 }, { 79, 0 }, 0 }, | 106 | { { 255 }, { 79, 0 }, 2 }, |
| 107 | { { 255 }, { 95, 0 }, 0 }, | 107 | { { 255 }, { 95, 0 }, 2 }, |
| 108 | { { 255 }, { 112, 0 }, 0 }, | 108 | { { 255 }, { 112, 0 }, 2 }, |
| 109 | { { 255 }, { 128, 0 }, 0 }, | 109 | { { 255 }, { 128, 0 }, 2 }, |
| 110 | { { 255 }, { 144, 0 }, 0 }, | 110 | { { 255 }, { 144, 0 }, 2 }, |
| 111 | { { 255 }, { 160, 0 }, 0 }, | 111 | { { 255 }, { 160, 0 }, 2 }, |
| 112 | { { 255 }, { 176, 0 }, 0 }, | 112 | { { 255 }, { 176, 0 }, 2 }, |
| 113 | { { 255 }, { 192, 0 }, 0 }, | 113 | { { 255 }, { 192, 0 }, 2 }, |
| 114 | { { 255 }, { 208, 0 }, 0 }, | 114 | { { 255 }, { 208, 0 }, 2 }, |
| 115 | { { 255 }, { 222, 1 }, 0 }, | 115 | { { 255 }, { 222, 1 }, 2 }, |
| 116 | { { 255 }, { 224, 13 }, 0 }, | 116 | { { 255 }, { 224, 13 }, 2 }, |
| 117 | { { 255 }, { 224, 25 }, 0 }, | 117 | { { 255 }, { 224, 25 }, 2 }, |
| 118 | { { 255 }, { 224, 38 }, 0 }, | 118 | { { 255 }, { 224, 38 }, 2 }, |
| 119 | { { 255 }, { 224, 50 }, 0 }, | 119 | { { 255 }, { 224, 50 }, 2 }, |
| 120 | { { 255 }, { 222, 62 }, 0 }, | 120 | { { 255 }, { 222, 62 }, 2 }, |
| 121 | { { 255 }, { 191, 64 }, 0 }, | 121 | { { 255 }, { 191, 64 }, 2 }, |
| 122 | { { 255 }, { 179, 64 }, 0 }, | 122 | { { 255 }, { 179, 64 }, 2 }, |
| 123 | { { 255 }, { 167, 64 }, 0 }, | 123 | { { 255 }, { 167, 64 }, 2 }, |
| 124 | { { 255 }, { 153, 64 }, 0 }, | 124 | { { 255 }, { 153, 64 }, 2 }, |
| 125 | { { 255 }, { 139, 64 }, 0 }, | 125 | { { 255 }, { 139, 64 }, 2 }, |
| 126 | { { 255 }, { 125, 64 }, 0 }, | 126 | { { 255 }, { 125, 64 }, 2 }, |
| 127 | { { 255 }, { 112, 64 }, 0 }, | 127 | { { 255 }, { 112, 64 }, 2 }, |
| 128 | { { 255 }, { 98, 64 }, 0 }, | 128 | { { 255 }, { 98, 64 }, 2 }, |
| 129 | { { 255 }, { 84, 64 }, 0 }, | 129 | { { 255 }, { 84, 64 }, 2 }, |
| 130 | { { 255 }, { 70, 64 }, 0 }, | 130 | { { 255 }, { 70, 64 }, 2 }, |
| 131 | { { 255 }, { 56, 64 }, 0 }, | 131 | { { 255 }, { 56, 64 }, 2 }, |
| 132 | { { 255 }, { 42, 64 }, 0 }, | 132 | { { 255 }, { 42, 64 }, 2 }, |
| 133 | { { 255 }, { 28, 64 }, 0 }, | 133 | { { 255 }, { 28, 64 }, 2 }, |
| 134 | { { 255 }, { 1, 62 }, 0 }, | 134 | { { 255 }, { 1, 62 }, 2 }, |
| 135 | { { 255 }, { 0, 50 }, 0 }, | 135 | { { 255 }, { 0, 50 }, 2 }, |
| 136 | { { 255 }, { 0, 38 }, 0 }, | 136 | { { 255 }, { 0, 38 }, 2 }, |
| 137 | { { 255 }, { 0, 25 }, 0 }, | 137 | { { 255 }, { 0, 25 }, 2 }, |
| 138 | { { 255 }, { 0, 13 }, 0 }, | 138 | { { 255 }, { 0, 13 }, 2 }, |
| 139 | }; | 139 | }; |
| 140 | 140 | ||
| 141 | #ifdef USB_LED_INDICATOR_ENABLE | 141 | #ifdef USB_LED_INDICATOR_ENABLE |
diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c index a4519d404..f6f79ad91 100644 --- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c +++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c | |||
| @@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | return false; | 97 | return false; |
| 98 | case RGB_TOG: | ||
| 99 | if (record->event.pressed) { | ||
| 100 | switch (rgb_matrix_get_flags()) { | ||
| 101 | case LED_FLAG_ALL: { | ||
| 102 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
| 103 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 104 | } | ||
| 105 | break; | ||
| 106 | case LED_FLAG_KEYLIGHT: { | ||
| 107 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 108 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 109 | } | ||
| 110 | break; | ||
| 111 | case LED_FLAG_UNDERGLOW: { | ||
| 112 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 113 | rgb_matrix_disable_noeeprom(); | ||
| 114 | } | ||
| 115 | break; | ||
| 116 | default: { | ||
| 117 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 118 | rgb_matrix_enable_noeeprom(); | ||
| 119 | } | ||
| 120 | break; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | return false; | ||
| 98 | default: | 124 | default: |
| 99 | return true; //Process all other keycodes normally | 125 | return true; //Process all other keycodes normally |
| 100 | } | 126 | } |
diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index a4519d404..f6f79ad91 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c | |||
| @@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | return false; | 97 | return false; |
| 98 | case RGB_TOG: | ||
| 99 | if (record->event.pressed) { | ||
| 100 | switch (rgb_matrix_get_flags()) { | ||
| 101 | case LED_FLAG_ALL: { | ||
| 102 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
| 103 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 104 | } | ||
| 105 | break; | ||
| 106 | case LED_FLAG_KEYLIGHT: { | ||
| 107 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 108 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 109 | } | ||
| 110 | break; | ||
| 111 | case LED_FLAG_UNDERGLOW: { | ||
| 112 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 113 | rgb_matrix_disable_noeeprom(); | ||
| 114 | } | ||
| 115 | break; | ||
| 116 | default: { | ||
| 117 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 118 | rgb_matrix_enable_noeeprom(); | ||
| 119 | } | ||
| 120 | break; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | return false; | ||
| 98 | default: | 124 | default: |
| 99 | return true; //Process all other keycodes normally | 125 | return true; //Process all other keycodes normally |
| 100 | } | 126 | } |
diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 26a1c6d01..222d7e2c5 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c | |||
| @@ -95,6 +95,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 95 | } | 95 | } |
| 96 | } | 96 | } |
| 97 | return false; | 97 | return false; |
| 98 | case RGB_TOG: | ||
| 99 | if (record->event.pressed) { | ||
| 100 | switch (rgb_matrix_get_flags()) { | ||
| 101 | case LED_FLAG_ALL: { | ||
| 102 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
| 103 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 104 | } | ||
| 105 | break; | ||
| 106 | case LED_FLAG_KEYLIGHT: { | ||
| 107 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 108 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 109 | } | ||
| 110 | break; | ||
| 111 | case LED_FLAG_UNDERGLOW: { | ||
| 112 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 113 | rgb_matrix_disable_noeeprom(); | ||
| 114 | } | ||
| 115 | break; | ||
| 116 | default: { | ||
| 117 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 118 | rgb_matrix_enable_noeeprom(); | ||
| 119 | } | ||
| 120 | break; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | return false; | ||
| 98 | default: | 124 | default: |
| 99 | return true; //Process all other keycodes normally | 125 | return true; //Process all other keycodes normally |
| 100 | } | 126 | } |
diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index df2e50921..9b9f98f5f 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h | |||
| @@ -123,6 +123,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 123 | #define RGB_MATRIX_KEYPRESSES | 123 | #define RGB_MATRIX_KEYPRESSES |
| 124 | #define RGB_MATRIX_LED_PROCESS_LIMIT 15 | 124 | #define RGB_MATRIX_LED_PROCESS_LIMIT 15 |
| 125 | #define RGB_MATRIX_LED_FLUSH_LIMIT 10 | 125 | #define RGB_MATRIX_LED_FLUSH_LIMIT 10 |
| 126 | #define RGB_MATRIX_EXTRA_TOG | ||
| 127 | 126 | ||
| 128 | #include "config_led.h" | 127 | #include "config_led.h" |
diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index afdbf3a22..20d9c649e 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c | |||
| @@ -5,133 +5,133 @@ | |||
| 5 | #include "rgb_matrix.h" | 5 | #include "rgb_matrix.h" |
| 6 | #include "config_led.h" | 6 | #include "config_led.h" |
| 7 | 7 | ||
| 8 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 8 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 9 | // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS | 9 | // KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS |
| 10 | { { 0|(0<<4) }, { 7, 5 }, 0 }, | 10 | { { 0|(0<<4) }, { 7, 5 }, 4 }, |
| 11 | { { 0|(1<<4) }, { 31, 5 }, 0 }, | 11 | { { 0|(1<<4) }, { 31, 5 }, 4 }, |
| 12 | { { 0|(2<<4) }, { 43, 5 }, 0 }, | 12 | { { 0|(2<<4) }, { 43, 5 }, 4 }, |
| 13 | { { 0|(3<<4) }, { 55, 5 }, 0 }, | 13 | { { 0|(3<<4) }, { 55, 5 }, 4 }, |
| 14 | { { 0|(4<<4) }, { 67, 5 }, 0 }, | 14 | { { 0|(4<<4) }, { 67, 5 }, 4 }, |
| 15 | { { 0|(5<<4) }, { 85, 5 }, 0 }, | 15 | { { 0|(5<<4) }, { 85, 5 }, 4 }, |
| 16 | { { 0|(6<<4) }, { 97, 5 }, 0 }, | 16 | { { 0|(6<<4) }, { 97, 5 }, 4 }, |
| 17 | { { 0|(7<<4) }, { 109, 5 }, 0 }, | 17 | { { 0|(7<<4) }, { 109, 5 }, 4 }, |
| 18 | { { 6|(0<<4) }, { 121, 5 }, 0 }, | 18 | { { 6|(0<<4) }, { 121, 5 }, 4 }, |
| 19 | { { 6|(1<<4) }, { 139, 5 }, 0 }, | 19 | { { 6|(1<<4) }, { 139, 5 }, 4 }, |
| 20 | { { 6|(2<<4) }, { 151, 5 }, 0 }, | 20 | { { 6|(2<<4) }, { 151, 5 }, 4 }, |
| 21 | { { 6|(3<<4) }, { 163, 5 }, 0 }, | 21 | { { 6|(3<<4) }, { 163, 5 }, 4 }, |
| 22 | { { 6|(4<<4) }, { 175, 5 }, 0 }, | 22 | { { 6|(4<<4) }, { 175, 5 }, 4 }, |
| 23 | { { 6|(5<<4) }, { 193, 5 }, 0 }, | 23 | { { 6|(5<<4) }, { 193, 5 }, 4 }, |
| 24 | { { 6|(6<<4) }, { 205, 5 }, 1 }, | 24 | { { 6|(6<<4) }, { 205, 5 }, 1 }, |
| 25 | { { 6|(7<<4) }, { 217, 5 }, 0 }, | 25 | { { 6|(7<<4) }, { 217, 5 }, 4 }, |
| 26 | // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP | 26 | // KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP |
| 27 | { { 1|(0<<4) }, { 7, 20 }, 0 }, | 27 | { { 1|(0<<4) }, { 7, 20 }, 4 }, |
| 28 | { { 1|(1<<4) }, { 19, 20 }, 0 }, | 28 | { { 1|(1<<4) }, { 19, 20 }, 4 }, |
| 29 | { { 1|(2<<4) }, { 31, 20 }, 0 }, | 29 | { { 1|(2<<4) }, { 31, 20 }, 4 }, |
| 30 | { { 1|(3<<4) }, { 43, 20 }, 0 }, | 30 | { { 1|(3<<4) }, { 43, 20 }, 4 }, |
| 31 | { { 1|(4<<4) }, { 55, 20 }, 0 }, | 31 | { { 1|(4<<4) }, { 55, 20 }, 4 }, |
| 32 | { { 1|(5<<4) }, { 67, 20 }, 0 }, | 32 | { { 1|(5<<4) }, { 67, 20 }, 4 }, |
| 33 | { { 1|(6<<4) }, { 79, 20 }, 0 }, | 33 | { { 1|(6<<4) }, { 79, 20 }, 4 }, |
| 34 | { { 1|(7<<4) }, { 91, 20 }, 0 }, | 34 | { { 1|(7<<4) }, { 91, 20 }, 4 }, |
| 35 | { { 7|(0<<4) }, { 103, 20 }, 0 }, | 35 | { { 7|(0<<4) }, { 103, 20 }, 4 }, |
| 36 | { { 7|(1<<4) }, { 115, 20 }, 0 }, | 36 | { { 7|(1<<4) }, { 115, 20 }, 4 }, |
| 37 | { { 7|(2<<4) }, { 127, 20 }, 0 }, | 37 | { { 7|(2<<4) }, { 127, 20 }, 4 }, |
| 38 | { { 7|(3<<4) }, { 139, 20 }, 0 }, | 38 | { { 7|(3<<4) }, { 139, 20 }, 4 }, |
| 39 | { { 7|(4<<4) }, { 151, 20 }, 0 }, | 39 | { { 7|(4<<4) }, { 151, 20 }, 4 }, |
| 40 | { { 7|(5<<4) }, { 169, 20 }, 0 }, | 40 | { { 7|(5<<4) }, { 169, 20 }, 4 }, |
| 41 | { { 7|(6<<4) }, { 193, 20 }, 0 }, | 41 | { { 7|(6<<4) }, { 193, 20 }, 4 }, |
| 42 | { { 7|(7<<4) }, { 205, 20 }, 0 }, | 42 | { { 7|(7<<4) }, { 205, 20 }, 4 }, |
| 43 | { { 9|(7<<4) }, { 217, 20 }, 0 }, | 43 | { { 9|(7<<4) }, { 217, 20 }, 4 }, |
| 44 | // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN | 44 | // KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN |
| 45 | { { 2|(0<<4) }, { 10, 30 }, 0 }, | 45 | { { 2|(0<<4) }, { 10, 30 }, 4 }, |
| 46 | { { 2|(1<<4) }, { 25, 30 }, 0 }, | 46 | { { 2|(1<<4) }, { 25, 30 }, 4 }, |
| 47 | { { 2|(2<<4) }, { 37, 30 }, 0 }, | 47 | { { 2|(2<<4) }, { 37, 30 }, 4 }, |
| 48 | { { 2|(3<<4) }, { 49, 30 }, 0 }, | 48 | { { 2|(3<<4) }, { 49, 30 }, 4 }, |
| 49 | { { 2|(4<<4) }, { 61, 30 }, 0 }, | 49 | { { 2|(4<<4) }, { 61, 30 }, 4 }, |
| 50 | { { 2|(5<<4) }, { 73, 30 }, 0 }, | 50 | { { 2|(5<<4) }, { 73, 30 }, 4 }, |
| 51 | { { 2|(6<<4) }, { 85, 30 }, 0 }, | 51 | { { 2|(6<<4) }, { 85, 30 }, 4 }, |
| 52 | { { 2|(7<<4) }, { 97, 30 }, 0 }, | 52 | { { 2|(7<<4) }, { 97, 30 }, 4 }, |
| 53 | { { 8|(0<<4) }, { 109, 30 }, 0 }, | 53 | { { 8|(0<<4) }, { 109, 30 }, 4 }, |
| 54 | { { 8|(1<<4) }, { 121, 30 }, 0 }, | 54 | { { 8|(1<<4) }, { 121, 30 }, 4 }, |
| 55 | { { 8|(2<<4) }, { 133, 30 }, 0 }, | 55 | { { 8|(2<<4) }, { 133, 30 }, 4 }, |
| 56 | { { 8|(3<<4) }, { 145, 30 }, 0 }, | 56 | { { 8|(3<<4) }, { 145, 30 }, 4 }, |
| 57 | { { 8|(4<<4) }, { 157, 30 }, 0 }, | 57 | { { 8|(4<<4) }, { 157, 30 }, 4 }, |
| 58 | { { 8|(5<<4) }, { 172, 30 }, 0 }, | 58 | { { 8|(5<<4) }, { 172, 30 }, 4 }, |
| 59 | { { 8|(6<<4) }, { 193, 30 }, 0 }, | 59 | { { 8|(6<<4) }, { 193, 30 }, 4 }, |
| 60 | { { 8|(7<<4) }, { 205, 30 }, 0 }, | 60 | { { 8|(7<<4) }, { 205, 30 }, 4 }, |
| 61 | { { 9|(6<<4) }, { 217, 30 }, 0 }, | 61 | { { 9|(6<<4) }, { 217, 30 }, 4 }, |
| 62 | // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT | 62 | // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT |
| 63 | { { 3|(0<<4) }, { 11, 39 }, 1 }, | 63 | { { 3|(0<<4) }, { 11, 39 }, 1 }, |
| 64 | { { 3|(1<<4) }, { 28, 39 }, 0 }, | 64 | { { 3|(1<<4) }, { 28, 39 }, 4 }, |
| 65 | { { 3|(2<<4) }, { 40, 39 }, 0 }, | 65 | { { 3|(2<<4) }, { 40, 39 }, 4 }, |
| 66 | { { 3|(3<<4) }, { 52, 39 }, 0 }, | 66 | { { 3|(3<<4) }, { 52, 39 }, 4 }, |
| 67 | { { 3|(4<<4) }, { 64, 39 }, 0 }, | 67 | { { 3|(4<<4) }, { 64, 39 }, 4 }, |
| 68 | { { 3|(5<<4) }, { 76, 39 }, 0 }, | 68 | { { 3|(5<<4) }, { 76, 39 }, 4 }, |
| 69 | { { 3|(6<<4) }, { 88, 39 }, 0 }, | 69 | { { 3|(6<<4) }, { 88, 39 }, 4 }, |
| 70 | { { 3|(7<<4) }, { 100, 39 }, 0 }, | 70 | { { 3|(7<<4) }, { 100, 39 }, 4 }, |
| 71 | { { 9|(0<<4) }, { 112, 39 }, 0 }, | 71 | { { 9|(0<<4) }, { 112, 39 }, 4 }, |
| 72 | { { 9|(1<<4) }, { 124, 39 }, 0 }, | 72 | { { 9|(1<<4) }, { 124, 39 }, 4 }, |
| 73 | { { 9|(2<<4) }, { 136, 39 }, 0 }, | 73 | { { 9|(2<<4) }, { 136, 39 }, 4 }, |
| 74 | { { 9|(3<<4) }, { 148, 39 }, 0 }, | 74 | { { 9|(3<<4) }, { 148, 39 }, 4 }, |
| 75 | { { 9|(4<<4) }, { 168, 39 }, 0 }, | 75 | { { 9|(4<<4) }, { 168, 39 }, 4 }, |
| 76 | // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP | 76 | // KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP |
| 77 | { { 4|(0<<4) }, { 14, 49 }, 0 }, | 77 | { { 4|(0<<4) }, { 14, 49 }, 4 }, |
| 78 | { { 4|(1<<4) }, { 34, 49 }, 0 }, | 78 | { { 4|(1<<4) }, { 34, 49 }, 4 }, |
| 79 | { { 4|(2<<4) }, { 46, 49 }, 0 }, | 79 | { { 4|(2<<4) }, { 46, 49 }, 4 }, |
| 80 | { { 4|(3<<4) }, { 58, 49 }, 0 }, | 80 | { { 4|(3<<4) }, { 58, 49 }, 4 }, |
| 81 | { { 4|(4<<4) }, { 70, 49 }, 0 }, | 81 | { { 4|(4<<4) }, { 70, 49 }, 4 }, |
| 82 | { { 4|(5<<4) }, { 82, 49 }, 0 }, | 82 | { { 4|(5<<4) }, { 82, 49 }, 4 }, |
| 83 | { { 4|(6<<4) }, { 94, 49 }, 0 }, | 83 | { { 4|(6<<4) }, { 94, 49 }, 4 }, |
| 84 | { { 4|(7<<4) }, { 106, 49 }, 0 }, | 84 | { { 4|(7<<4) }, { 106, 49 }, 4 }, |
| 85 | { { 10|(0<<4) }, { 118, 49 }, 0 }, | 85 | { { 10|(0<<4) }, { 118, 49 }, 4 }, |
| 86 | { { 10|(1<<4) }, { 130, 49 }, 0 }, | 86 | { { 10|(1<<4) }, { 130, 49 }, 4 }, |
| 87 | { { 10|(2<<4) }, { 142, 49 }, 0 }, | 87 | { { 10|(2<<4) }, { 142, 49 }, 4 }, |
| 88 | { { 10|(3<<4) }, { 165, 49 }, 0 }, | 88 | { { 10|(3<<4) }, { 165, 49 }, 4 }, |
| 89 | { { 9|(5<<4) }, { 205, 49 }, 0 }, | 89 | { { 9|(5<<4) }, { 205, 49 }, 4 }, |
| 90 | // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | 90 | // KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT |
| 91 | { { 5|(0<<4) }, { 8, 59 }, 0 }, | 91 | { { 5|(0<<4) }, { 8, 59 }, 4 }, |
| 92 | { { 5|(1<<4) }, { 23, 59 }, 0 }, | 92 | { { 5|(1<<4) }, { 23, 59 }, 4 }, |
| 93 | { { 5|(2<<4) }, { 38, 59 }, 0 }, | 93 | { { 5|(2<<4) }, { 38, 59 }, 4 }, |
| 94 | { { 5|(3<<4) }, { 83, 59 }, 0 }, | 94 | { { 5|(3<<4) }, { 83, 59 }, 4 }, |
| 95 | { { 5|(4<<4) }, { 129, 59 }, 0 }, | 95 | { { 5|(4<<4) }, { 129, 59 }, 4 }, |
| 96 | { { 5|(5<<4) }, { 144, 59 }, 0 }, | 96 | { { 5|(5<<4) }, { 144, 59 }, 4 }, |
| 97 | { { 5|(6<<4) }, { 159, 59 }, 0 }, | 97 | { { 5|(6<<4) }, { 159, 59 }, 4 }, |
| 98 | { { 5|(7<<4) }, { 174, 59 }, 0 }, | 98 | { { 5|(7<<4) }, { 174, 59 }, 4 }, |
| 99 | { { 10|(4<<4) }, { 193, 59 }, 0 }, | 99 | { { 10|(4<<4) }, { 193, 59 }, 4 }, |
| 100 | { { 10|(5<<4) }, { 205, 59 }, 0 }, | 100 | { { 10|(5<<4) }, { 205, 59 }, 4 }, |
| 101 | { { 10|(6<<4) }, { 217, 59 }, 0 }, | 101 | { { 10|(6<<4) }, { 217, 59 }, 4 }, |
| 102 | // Underglow / Border | 102 | // Underglow / Border |
| 103 | { { 0xFF }, { 222, 64 }, 0 }, | 103 | { { 0xFF }, { 222, 64 }, 2 }, |
| 104 | { { 0xFF }, { 204, 64 }, 0 }, | 104 | { { 0xFF }, { 204, 64 }, 2 }, |
| 105 | { { 0xFF }, { 186, 64 }, 0 }, | 105 | { { 0xFF }, { 186, 64 }, 2 }, |
| 106 | { { 0xFF }, { 167, 64 }, 0 }, | 106 | { { 0xFF }, { 167, 64 }, 2 }, |
| 107 | { { 0xFF }, { 149, 64 }, 0 }, | 107 | { { 0xFF }, { 149, 64 }, 2 }, |
| 108 | { { 0xFF }, { 130, 64 }, 0 }, | 108 | { { 0xFF }, { 130, 64 }, 2 }, |
| 109 | { { 0xFF }, { 112, 64 }, 0 }, | 109 | { { 0xFF }, { 112, 64 }, 2 }, |
| 110 | { { 0xFF }, { 94, 64 }, 0 }, | 110 | { { 0xFF }, { 94, 64 }, 2 }, |
| 111 | { { 0xFF }, { 75, 64 }, 0 }, | 111 | { { 0xFF }, { 75, 64 }, 2 }, |
| 112 | { { 0xFF }, { 57, 64 }, 0 }, | 112 | { { 0xFF }, { 57, 64 }, 2 }, |
| 113 | { { 0xFF }, { 38, 64 }, 0 }, | 113 | { { 0xFF }, { 38, 64 }, 2 }, |
| 114 | { { 0xFF }, { 20, 64 }, 0 }, | 114 | { { 0xFF }, { 20, 64 }, 2 }, |
| 115 | { { 0xFF }, { 0, 64 }, 0 }, | 115 | { { 0xFF }, { 0, 64 }, 2 }, |
| 116 | { { 0xFF }, { 0, 47 }, 0 }, | 116 | { { 0xFF }, { 0, 47 }, 2 }, |
| 117 | { { 0xFF }, { 0, 32 }, 0 }, | 117 | { { 0xFF }, { 0, 32 }, 2 }, |
| 118 | { { 0xFF }, { 0, 17 }, 0 }, | 118 | { { 0xFF }, { 0, 17 }, 2 }, |
| 119 | { { 0xFF }, { 0, 0 }, 0 }, | 119 | { { 0xFF }, { 0, 0 }, 2 }, |
| 120 | { { 0xFF }, { 20, 0 }, 0 }, | 120 | { { 0xFF }, { 20, 0 }, 2 }, |
| 121 | { { 0xFF }, { 38, 0 }, 0 }, | 121 | { { 0xFF }, { 38, 0 }, 2 }, |
| 122 | { { 0xFF }, { 57, 0 }, 0 }, | 122 | { { 0xFF }, { 57, 0 }, 2 }, |
| 123 | { { 0xFF }, { 75, 0 }, 0 }, | 123 | { { 0xFF }, { 75, 0 }, 2 }, |
| 124 | { { 0xFF }, { 94, 0 }, 0 }, | 124 | { { 0xFF }, { 94, 0 }, 2 }, |
| 125 | { { 0xFF }, { 112, 0 }, 0 }, | 125 | { { 0xFF }, { 112, 0 }, 2 }, |
| 126 | { { 0xFF }, { 130, 0 }, 0 }, | 126 | { { 0xFF }, { 130, 0 }, 2 }, |
| 127 | { { 0xFF }, { 149, 0 }, 0 }, | 127 | { { 0xFF }, { 149, 0 }, 2 }, |
| 128 | { { 0xFF }, { 167, 0 }, 0 }, | 128 | { { 0xFF }, { 167, 0 }, 2 }, |
| 129 | { { 0xFF }, { 186, 0 }, 0 }, | 129 | { { 0xFF }, { 186, 0 }, 2 }, |
| 130 | { { 0xFF }, { 204, 0 }, 0 }, | 130 | { { 0xFF }, { 204, 0 }, 2 }, |
| 131 | { { 0xFF }, { 222, 1 }, 0 }, | 131 | { { 0xFF }, { 222, 1 }, 2 }, |
| 132 | { { 0xFF }, { 224, 17 }, 0 }, | 132 | { { 0xFF }, { 224, 17 }, 2 }, |
| 133 | { { 0xFF }, { 224, 32 }, 0 }, | 133 | { { 0xFF }, { 224, 32 }, 2 }, |
| 134 | { { 0xFF }, { 224, 47 }, 0 }, | 134 | { { 0xFF }, { 224, 47 }, 2 }, |
| 135 | }; | 135 | }; |
| 136 | 136 | ||
| 137 | #ifdef USB_LED_INDICATOR_ENABLE | 137 | #ifdef USB_LED_INDICATOR_ENABLE |
diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 182abbbad..53c96d95d 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c | |||
| @@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | return false; | 100 | return false; |
| 101 | case RGB_TOG: | ||
| 102 | if (record->event.pressed) { | ||
| 103 | switch (rgb_matrix_get_flags()) { | ||
| 104 | case LED_FLAG_ALL: { | ||
| 105 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
| 106 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 107 | } | ||
| 108 | break; | ||
| 109 | case LED_FLAG_KEYLIGHT: { | ||
| 110 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 111 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 112 | } | ||
| 113 | break; | ||
| 114 | case LED_FLAG_UNDERGLOW: { | ||
| 115 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 116 | rgb_matrix_disable_noeeprom(); | ||
| 117 | } | ||
| 118 | break; | ||
| 119 | default: { | ||
| 120 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 121 | rgb_matrix_enable_noeeprom(); | ||
| 122 | } | ||
| 123 | break; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | return false; | ||
| 101 | default: | 127 | default: |
| 102 | return true; //Process all other keycodes normally | 128 | return true; //Process all other keycodes normally |
| 103 | } | 129 | } |
diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index 41cf82757..79fe7388a 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c | |||
| @@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | return false; | 100 | return false; |
| 101 | case RGB_TOG: | ||
| 102 | if (record->event.pressed) { | ||
| 103 | switch (rgb_matrix_get_flags()) { | ||
| 104 | case LED_FLAG_ALL: { | ||
| 105 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT); | ||
| 106 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 107 | } | ||
| 108 | break; | ||
| 109 | case LED_FLAG_KEYLIGHT: { | ||
| 110 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | ||
| 111 | rgb_matrix_set_color_all(0, 0, 0); | ||
| 112 | } | ||
| 113 | break; | ||
| 114 | case LED_FLAG_UNDERGLOW: { | ||
| 115 | rgb_matrix_set_flags(LED_FLAG_NONE); | ||
| 116 | rgb_matrix_disable_noeeprom(); | ||
| 117 | } | ||
| 118 | break; | ||
| 119 | default: { | ||
| 120 | rgb_matrix_set_flags(LED_FLAG_ALL); | ||
| 121 | rgb_matrix_enable_noeeprom(); | ||
| 122 | } | ||
| 123 | break; | ||
| 124 | } | ||
| 125 | } | ||
| 126 | return false; | ||
| 101 | default: | 127 | default: |
| 102 | return true; //Process all other keycodes normally | 128 | return true; //Process all other keycodes normally |
| 103 | } | 129 | } |
diff --git a/keyboards/model01/leds.c b/keyboards/model01/leds.c index 7a62c7424..0abc1f0da 100644 --- a/keyboards/model01/leds.c +++ b/keyboards/model01/leds.c | |||
| @@ -46,34 +46,34 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) { | |||
| 46 | #ifdef RGB_MATRIX_ENABLE | 46 | #ifdef RGB_MATRIX_ENABLE |
| 47 | 47 | ||
| 48 | __attribute__ ((weak)) | 48 | __attribute__ ((weak)) |
| 49 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 49 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 50 | {{0x73}, { 3, 35}, 0}, | 50 | {{0x73}, { 3, 35}, 4}, |
| 51 | {{0x72}, { 0, 26}, 0}, | 51 | {{0x72}, { 0, 26}, 4}, |
| 52 | {{0x71}, { 0, 17}, 0}, | 52 | {{0x71}, { 0, 17}, 4}, |
| 53 | {{0x70}, { 0, 6}, 0}, | 53 | {{0x70}, { 0, 6}, 4}, |
| 54 | {{0x60}, { 14, 5}, 0}, | 54 | {{0x60}, { 14, 5}, 4}, |
| 55 | {{0x61}, { 15, 16}, 0}, | 55 | {{0x61}, { 15, 16}, 4}, |
| 56 | {{0x62}, { 16, 25}, 0}, | 56 | {{0x62}, { 16, 25}, 4}, |
| 57 | {{0x63}, { 17, 34}, 0}, | 57 | {{0x63}, { 17, 34}, 4}, |
| 58 | {{0x53}, { 31, 29}, 0}, | 58 | {{0x53}, { 31, 29}, 4}, |
| 59 | {{0x52}, { 31, 19}, 0}, | 59 | {{0x52}, { 31, 19}, 4}, |
| 60 | {{0x51}, { 30, 11}, 0}, | 60 | {{0x51}, { 30, 11}, 4}, |
| 61 | {{0x50}, { 30, 1}, 0}, | 61 | {{0x50}, { 30, 1}, 4}, |
| 62 | {{0x40}, { 45, 0}, 0}, | 62 | {{0x40}, { 45, 0}, 4}, |
| 63 | {{0x41}, { 45, 8}, 0}, | 63 | {{0x41}, { 45, 8}, 4}, |
| 64 | {{0x42}, { 46, 17}, 0}, | 64 | {{0x42}, { 46, 17}, 4}, |
| 65 | {{0x43}, { 46, 27}, 0}, | 65 | {{0x43}, { 46, 27}, 4}, |
| 66 | {{0x33}, { 60, 27}, 0}, | 66 | {{0x33}, { 60, 27}, 4}, |
| 67 | {{0x32}, { 60, 18}, 0}, | 67 | {{0x32}, { 60, 18}, 4}, |
| 68 | {{0x31}, { 60, 9}, 0}, | 68 | {{0x31}, { 60, 9}, 4}, |
| 69 | {{0x30}, { 60, 0}, 0}, | 69 | {{0x30}, { 60, 0}, 4}, |
| 70 | {{0x20}, { 74, 2}, 0}, | 70 | {{0x20}, { 74, 2}, 4}, |
| 71 | {{0x21}, { 74, 11}, 0}, | 71 | {{0x21}, { 74, 11}, 4}, |
| 72 | {{0x22}, { 75, 20}, 0}, | 72 | {{0x22}, { 75, 20}, 4}, |
| 73 | {{0x23}, { 74, 28}, 0}, | 73 | {{0x23}, { 74, 28}, 4}, |
| 74 | {{0x12}, { 89, 30}, 0}, | 74 | {{0x12}, { 89, 30}, 4}, |
| 75 | {{0x11}, { 89, 19}, 0}, | 75 | {{0x11}, { 89, 19}, 4}, |
| 76 | {{0x10}, { 89, 7}, 0}, | 76 | {{0x10}, { 89, 7}, 4}, |
| 77 | {{0x00}, { 70, 38}, 1}, | 77 | {{0x00}, { 70, 38}, 1}, |
| 78 | {{0x01}, { 82, 41}, 1}, | 78 | {{0x01}, { 82, 41}, 1}, |
| 79 | {{0x02}, { 93, 45}, 1}, | 79 | {{0x02}, { 93, 45}, 1}, |
| @@ -84,33 +84,33 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 84 | {{0x76}, {130, 45}, 1}, | 84 | {{0x76}, {130, 45}, 1}, |
| 85 | {{0x75}, {141, 41}, 1}, | 85 | {{0x75}, {141, 41}, 1}, |
| 86 | {{0x74}, {153, 38}, 1}, | 86 | {{0x74}, {153, 38}, 1}, |
| 87 | {{0x64}, {134, 7}, 0}, | 87 | {{0x64}, {134, 7}, 4}, |
| 88 | {{0x65}, {134, 19}, 0}, | 88 | {{0x65}, {134, 19}, 4}, |
| 89 | {{0x66}, {134, 30}, 0}, | 89 | {{0x66}, {134, 30}, 4}, |
| 90 | {{0x57}, {149, 28}, 0}, | 90 | {{0x57}, {149, 28}, 4}, |
| 91 | {{0x56}, {148, 20}, 0}, | 91 | {{0x56}, {148, 20}, 4}, |
| 92 | {{0x55}, {149, 11}, 0}, | 92 | {{0x55}, {149, 11}, 4}, |
| 93 | {{0x54}, {149, 2}, 0}, | 93 | {{0x54}, {149, 2}, 4}, |
| 94 | {{0x44}, {163, 0}, 0}, | 94 | {{0x44}, {163, 0}, 4}, |
| 95 | {{0x45}, {163, 9}, 0}, | 95 | {{0x45}, {163, 9}, 4}, |
| 96 | {{0x46}, {163, 18}, 0}, | 96 | {{0x46}, {163, 18}, 4}, |
| 97 | {{0x47}, {163, 27}, 0}, | 97 | {{0x47}, {163, 27}, 4}, |
| 98 | {{0x37}, {177, 27}, 0}, | 98 | {{0x37}, {177, 27}, 4}, |
| 99 | {{0x36}, {177, 17}, 0}, | 99 | {{0x36}, {177, 17}, 4}, |
| 100 | {{0x35}, {178, 8}, 0}, | 100 | {{0x35}, {178, 8}, 4}, |
| 101 | {{0x34}, {178, 0}, 0}, | 101 | {{0x34}, {178, 0}, 4}, |
| 102 | {{0x24}, {193, 1}, 0}, | 102 | {{0x24}, {193, 1}, 4}, |
| 103 | {{0x25}, {193, 11}, 0}, | 103 | {{0x25}, {193, 11}, 4}, |
| 104 | {{0x26}, {192, 19}, 0}, | 104 | {{0x26}, {192, 19}, 4}, |
| 105 | {{0x27}, {192, 29}, 0}, | 105 | {{0x27}, {192, 29}, 4}, |
| 106 | {{0x17}, {206, 34}, 0}, | 106 | {{0x17}, {206, 34}, 4}, |
| 107 | {{0x16}, {207, 25}, 0}, | 107 | {{0x16}, {207, 25}, 4}, |
| 108 | {{0x15}, {208, 16}, 0}, | 108 | {{0x15}, {208, 16}, 4}, |
| 109 | {{0x14}, {209, 5}, 0}, | 109 | {{0x14}, {209, 5}, 4}, |
| 110 | {{0x04}, {224, 6}, 0}, | 110 | {{0x04}, {224, 6}, 4}, |
| 111 | {{0x05}, {223, 17}, 0}, | 111 | {{0x05}, {223, 17}, 4}, |
| 112 | {{0x06}, {223, 26}, 0}, | 112 | {{0x06}, {223, 26}, 4}, |
| 113 | {{0x07}, {220, 35}, 0}, | 113 | {{0x07}, {220, 35}, 4}, |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | static struct { | 116 | static struct { |
diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index c3b7e2617..94f507189 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c | |||
| @@ -79,49 +79,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 79 | 79 | ||
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 82 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 83 | 83 | ||
| 84 | /*{row | col << 4} | 84 | /*{row | col << 4} |
| 85 | | {x=0..224, y=0..64} | 85 | | {x=0..224, y=0..64} |
| 86 | | | modifier | 86 | | | flags |
| 87 | | | | */ | 87 | | | | */ |
| 88 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, | 88 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, |
| 89 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, | 89 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 4}, |
| 90 | {{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, | 90 | {{0|(2<<4)}, {20.36*2, 21.33*0}, 4}, |
| 91 | {{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, | 91 | {{0|(3<<4)}, {20.36*3, 21.33*0}, 4}, |
| 92 | {{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, | 92 | {{0|(4<<4)}, {20.36*4, 21.33*0}, 4}, |
| 93 | {{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, | 93 | {{0|(5<<4)}, {20.36*5, 21.33*0}, 4}, |
| 94 | {{4|(0<<4)}, {20.36*6, 21.33*0}, 0}, | 94 | {{4|(0<<4)}, {20.36*6, 21.33*0}, 4}, |
| 95 | {{4|(1<<4)}, {20.36*7, 21.33*0}, 0}, | 95 | {{4|(1<<4)}, {20.36*7, 21.33*0}, 4}, |
| 96 | {{4|(2<<4)}, {20.36*8, 21.33*0}, 0}, | 96 | {{4|(2<<4)}, {20.36*8, 21.33*0}, 4}, |
| 97 | {{4|(3<<4)}, {20.36*9, 21.33*0}, 0}, | 97 | {{4|(3<<4)}, {20.36*9, 21.33*0}, 4}, |
| 98 | {{4|(4<<4)}, {20.36*10,21.33*0}, 0}, | 98 | {{4|(4<<4)}, {20.36*10,21.33*0}, 4}, |
| 99 | {{4|(5<<4)}, {20.36*11,21.33*0}, 1}, | 99 | {{4|(5<<4)}, {20.36*11,21.33*0}, 1}, |
| 100 | 100 | ||
| 101 | {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, | 101 | {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, |
| 102 | {{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, | 102 | {{1|(1<<4)}, {20.36*1, 21.33*1}, 4}, |
| 103 | {{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, | 103 | {{1|(2<<4)}, {20.36*2, 21.33*1}, 4}, |
| 104 | {{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, | 104 | {{1|(3<<4)}, {20.36*3, 21.33*1}, 4}, |
| 105 | {{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, | 105 | {{1|(4<<4)}, {20.36*4, 21.33*1}, 4}, |
| 106 | {{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, | 106 | {{1|(5<<4)}, {20.36*5, 21.33*1}, 4}, |
| 107 | {{5|(0<<4)}, {20.36*6, 21.33*1}, 0}, | 107 | {{5|(0<<4)}, {20.36*6, 21.33*1}, 4}, |
| 108 | {{5|(1<<4)}, {20.36*7, 21.33*1}, 0}, | 108 | {{5|(1<<4)}, {20.36*7, 21.33*1}, 4}, |
| 109 | {{5|(2<<4)}, {20.36*8, 21.33*1}, 0}, | 109 | {{5|(2<<4)}, {20.36*8, 21.33*1}, 4}, |
| 110 | {{5|(3<<4)}, {20.36*9, 21.33*1}, 0}, | 110 | {{5|(3<<4)}, {20.36*9, 21.33*1}, 4}, |
| 111 | {{5|(4<<4)}, {20.36*10,21.33*1}, 0}, | 111 | {{5|(4<<4)}, {20.36*10,21.33*1}, 4}, |
| 112 | {{5|(5<<4)}, {20.36*11,21.33*1}, 1}, | 112 | {{5|(5<<4)}, {20.36*11,21.33*1}, 1}, |
| 113 | 113 | ||
| 114 | {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, | 114 | {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, |
| 115 | {{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, | 115 | {{2|(1<<4)}, {20.36*1, 21.33*2}, 4}, |
| 116 | {{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, | 116 | {{2|(2<<4)}, {20.36*2, 21.33*2}, 4}, |
| 117 | {{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, | 117 | {{2|(3<<4)}, {20.36*3, 21.33*2}, 4}, |
| 118 | {{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, | 118 | {{2|(4<<4)}, {20.36*4, 21.33*2}, 4}, |
| 119 | {{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, | 119 | {{2|(5<<4)}, {20.36*5, 21.33*2}, 4}, |
| 120 | {{6|(0<<4)}, {20.36*6, 21.33*2}, 0}, | 120 | {{6|(0<<4)}, {20.36*6, 21.33*2}, 4}, |
| 121 | {{6|(1<<4)}, {20.36*7, 21.33*2}, 0}, | 121 | {{6|(1<<4)}, {20.36*7, 21.33*2}, 4}, |
| 122 | {{6|(2<<4)}, {20.36*8, 21.33*2}, 0}, | 122 | {{6|(2<<4)}, {20.36*8, 21.33*2}, 4}, |
| 123 | {{6|(3<<4)}, {20.36*9, 21.33*2}, 0}, | 123 | {{6|(3<<4)}, {20.36*9, 21.33*2}, 4}, |
| 124 | {{6|(4<<4)}, {20.36*10,21.33*2}, 0}, | 124 | {{6|(4<<4)}, {20.36*10,21.33*2}, 4}, |
| 125 | {{6|(5<<4)}, {20.36*11,21.33*2}, 1}, | 125 | {{6|(5<<4)}, {20.36*11,21.33*2}, 1}, |
| 126 | 126 | ||
| 127 | {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, | 127 | {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, |
| @@ -129,7 +129,7 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 129 | {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, | 129 | {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, |
| 130 | {{7|(3<<4)}, {20.36*3, 21.33*3}, 1}, | 130 | {{7|(3<<4)}, {20.36*3, 21.33*3}, 1}, |
| 131 | {{7|(4<<4)}, {20.36*4, 21.33*3}, 1}, | 131 | {{7|(4<<4)}, {20.36*4, 21.33*3}, 1}, |
| 132 | {{7|(5<<4)}, {20.36*5.5,21.33*3}, 0}, | 132 | {{7|(5<<4)}, {20.36*5.5,21.33*3}, 4}, |
| 133 | {{7|(0<<4)}, {20.36*7, 21.33*3}, 1}, | 133 | {{7|(0<<4)}, {20.36*7, 21.33*3}, 1}, |
| 134 | {{7|(1<<4)}, {20.36*8, 21.33*3}, 1}, | 134 | {{7|(1<<4)}, {20.36*8, 21.33*3}, 1}, |
| 135 | {{7|(2<<4)}, {20.36*9, 21.33*3}, 1}, | 135 | {{7|(2<<4)}, {20.36*9, 21.33*3}, 1}, |
diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index 6e3b08938..5b7177c6c 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c | |||
| @@ -231,7 +231,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 231 | case _RAISE: | 231 | case _RAISE: |
| 232 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 232 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 233 | led = g_rgb_leds[i]; | 233 | led = g_rgb_leds[i]; |
| 234 | if ( led.modifier ) { | 234 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 235 | rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); | 235 | rgb_matrix_set_color(i, 0x6B, 0x00, 0x80); |
| 236 | } else { | 236 | } else { |
| 237 | rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); | 237 | rgb_matrix_set_color(i, 0x00, 0xFF, 0x00); |
| @@ -242,7 +242,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 242 | case _LOWER: | 242 | case _LOWER: |
| 243 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 243 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 244 | led = g_rgb_leds[i]; | 244 | led = g_rgb_leds[i]; |
| 245 | if ( led.modifier ) { | 245 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 246 | rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); | 246 | rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00); |
| 247 | } else { | 247 | } else { |
| 248 | rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); | 248 | rgb_matrix_set_color(i, 0x00, 0x67, 0xC7); |
diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index f463090dd..178d28274 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c | |||
| @@ -77,49 +77,49 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
| 77 | {1, C9_14, C8_14, C7_14} | 77 | {1, C9_14, C8_14, C7_14} |
| 78 | }; | 78 | }; |
| 79 | 79 | ||
| 80 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 80 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 81 | 81 | ||
| 82 | /*{row | col << 4} | 82 | /*{row | col << 4} |
| 83 | | {x=0..224, y=0..64} | 83 | | {x=0..224, y=0..64} |
| 84 | | | modifier | 84 | | | flags |
| 85 | | | | */ | 85 | | | | */ |
| 86 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, | 86 | {{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, |
| 87 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 0}, | 87 | {{0|(1<<4)}, {20.36*1, 21.33*0}, 4}, |
| 88 | {{0|(2<<4)}, {20.36*2, 21.33*0}, 0}, | 88 | {{0|(2<<4)}, {20.36*2, 21.33*0}, 4}, |
| 89 | {{0|(3<<4)}, {20.36*3, 21.33*0}, 0}, | 89 | {{0|(3<<4)}, {20.36*3, 21.33*0}, 4}, |
| 90 | {{0|(4<<4)}, {20.36*4, 21.33*0}, 0}, | 90 | {{0|(4<<4)}, {20.36*4, 21.33*0}, 4}, |
| 91 | {{0|(5<<4)}, {20.36*5, 21.33*0}, 0}, | 91 | {{0|(5<<4)}, {20.36*5, 21.33*0}, 4}, |
| 92 | {{0|(6<<4)}, {20.36*6, 21.33*0}, 0}, | 92 | {{0|(6<<4)}, {20.36*6, 21.33*0}, 4}, |
| 93 | {{0|(7<<4)}, {20.36*7, 21.33*0}, 0}, | 93 | {{0|(7<<4)}, {20.36*7, 21.33*0}, 4}, |
| 94 | {{0|(8<<4)}, {20.36*8, 21.33*0}, 0}, | 94 | {{0|(8<<4)}, {20.36*8, 21.33*0}, 4}, |
| 95 | {{0|(9<<4)}, {20.36*9, 21.33*0}, 0}, | 95 | {{0|(9<<4)}, {20.36*9, 21.33*0}, 4}, |
| 96 | {{0|(10<<4)}, {20.36*10,21.33*0}, 0}, | 96 | {{0|(10<<4)}, {20.36*10,21.33*0}, 4}, |
| 97 | {{0|(11<<4)}, {20.36*11,21.33*0}, 1}, | 97 | {{0|(11<<4)}, {20.36*11,21.33*0}, 1}, |
| 98 | 98 | ||
| 99 | {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, | 99 | {{1|(0<<4)}, {20.36*0, 21.33*1}, 1}, |
| 100 | {{1|(1<<4)}, {20.36*1, 21.33*1}, 0}, | 100 | {{1|(1<<4)}, {20.36*1, 21.33*1}, 4}, |
| 101 | {{1|(2<<4)}, {20.36*2, 21.33*1}, 0}, | 101 | {{1|(2<<4)}, {20.36*2, 21.33*1}, 4}, |
| 102 | {{1|(3<<4)}, {20.36*3, 21.33*1}, 0}, | 102 | {{1|(3<<4)}, {20.36*3, 21.33*1}, 4}, |
| 103 | {{1|(4<<4)}, {20.36*4, 21.33*1}, 0}, | 103 | {{1|(4<<4)}, {20.36*4, 21.33*1}, 4}, |
| 104 | {{1|(5<<4)}, {20.36*5, 21.33*1}, 0}, | 104 | {{1|(5<<4)}, {20.36*5, 21.33*1}, 4}, |
| 105 | {{1|(6<<4)}, {20.36*6, 21.33*1}, 0}, | 105 | {{1|(6<<4)}, {20.36*6, 21.33*1}, 4}, |
| 106 | {{1|(7<<4)}, {20.36*7, 21.33*1}, 0}, | 106 | {{1|(7<<4)}, {20.36*7, 21.33*1}, 4}, |
| 107 | {{1|(8<<4)}, {20.36*8, 21.33*1}, 0}, | 107 | {{1|(8<<4)}, {20.36*8, 21.33*1}, 4}, |
| 108 | {{1|(9<<4)}, {20.36*9, 21.33*1}, 0}, | 108 | {{1|(9<<4)}, {20.36*9, 21.33*1}, 4}, |
| 109 | {{1|(10<<4)}, {20.36*10,21.33*1}, 0}, | 109 | {{1|(10<<4)}, {20.36*10,21.33*1}, 4}, |
| 110 | {{1|(11<<4)}, {20.36*11,21.33*1}, 1}, | 110 | {{1|(11<<4)}, {20.36*11,21.33*1}, 1}, |
| 111 | 111 | ||
| 112 | {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, | 112 | {{2|(0<<4)}, {20.36*0, 21.33*2}, 1}, |
| 113 | {{2|(1<<4)}, {20.36*1, 21.33*2}, 0}, | 113 | {{2|(1<<4)}, {20.36*1, 21.33*2}, 4}, |
| 114 | {{2|(2<<4)}, {20.36*2, 21.33*2}, 0}, | 114 | {{2|(2<<4)}, {20.36*2, 21.33*2}, 4}, |
| 115 | {{2|(3<<4)}, {20.36*3, 21.33*2}, 0}, | 115 | {{2|(3<<4)}, {20.36*3, 21.33*2}, 4}, |
| 116 | {{2|(4<<4)}, {20.36*4, 21.33*2}, 0}, | 116 | {{2|(4<<4)}, {20.36*4, 21.33*2}, 4}, |
| 117 | {{2|(5<<4)}, {20.36*5, 21.33*2}, 0}, | 117 | {{2|(5<<4)}, {20.36*5, 21.33*2}, 4}, |
| 118 | {{2|(6<<4)}, {20.36*6, 21.33*2}, 0}, | 118 | {{2|(6<<4)}, {20.36*6, 21.33*2}, 4}, |
| 119 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 0}, | 119 | {{2|(7<<4)}, {20.36*7, 21.33*2}, 4}, |
| 120 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 0}, | 120 | {{2|(8<<4)}, {20.36*8, 21.33*2}, 4}, |
| 121 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 0}, | 121 | {{2|(9<<4)}, {20.36*9, 21.33*2}, 4}, |
| 122 | {{2|(10<<4)}, {20.36*10,21.33*2}, 0}, | 122 | {{2|(10<<4)}, {20.36*10,21.33*2}, 4}, |
| 123 | {{2|(11<<4)}, {20.36*11,21.33*2}, 1}, | 123 | {{2|(11<<4)}, {20.36*11,21.33*2}, 1}, |
| 124 | 124 | ||
| 125 | {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, | 125 | {{3|(0<<4)}, {20.36*0, 21.33*3}, 1}, |
| @@ -127,9 +127,9 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
| 127 | {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, | 127 | {{3|(2<<4)}, {20.36*2, 21.33*3}, 1}, |
| 128 | {{3|(3<<4)}, {20.36*3, 21.33*3}, 1}, | 128 | {{3|(3<<4)}, {20.36*3, 21.33*3}, 1}, |
| 129 | {{3|(4<<4)}, {20.36*4, 21.33*3}, 1}, | 129 | {{3|(4<<4)}, {20.36*4, 21.33*3}, 1}, |
| 130 | {{3|(5<<4)}, {20.36*5, 21.33*3}, 0}, | 130 | {{3|(5<<4)}, {20.36*5, 21.33*3}, 4}, |
| 131 | {{3|(5<<4)}, {20.36*5.5,21.33*3}, 0}, | 131 | {{3|(5<<4)}, {20.36*5.5,21.33*3}, 4}, |
| 132 | {{3|(6<<4)}, {20.36*6, 21.33*3}, 0}, | 132 | {{3|(6<<4)}, {20.36*6, 21.33*3}, 4}, |
| 133 | {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, | 133 | {{3|(7<<4)}, {20.36*7, 21.33*3}, 1}, |
| 134 | {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, | 134 | {{3|(8<<4)}, {20.36*8, 21.33*3}, 1}, |
| 135 | {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, | 135 | {{3|(9<<4)}, {20.36*9, 21.33*3}, 1}, |
diff --git a/keyboards/sol/rev1/rev1.c b/keyboards/sol/rev1/rev1.c index 049b5c218..b668b02e9 100644 --- a/keyboards/sol/rev1/rev1.c +++ b/keyboards/sol/rev1/rev1.c | |||
| @@ -1,35 +1,35 @@ | |||
| 1 | #include "sol.h" | 1 | #include "sol.h" |
| 2 | 2 | ||
| 3 | #ifdef RGB_MATRIX_ENABLE | 3 | #ifdef RGB_MATRIX_ENABLE |
| 4 | const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | 4 | rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { |
| 5 | // Left Hand Mapped Left to Right | 5 | // Left Hand Mapped Left to Right |
| 6 | { { 0 | (0 << 4) }, { 0, 0 }, 1}, | 6 | { { 0 | (0 << 4) }, { 0, 0 }, 1}, |
| 7 | { { 0 | (1 << 4) }, { 22, 0 }, 0}, | 7 | { { 0 | (1 << 4) }, { 22, 0 }, 4}, |
| 8 | { { 0 | (2 << 4) }, { 37, 0 }, 0}, | 8 | { { 0 | (2 << 4) }, { 37, 0 }, 4}, |
| 9 | { { 0 | (3 << 4) }, { 37, 0 }, 0}, | 9 | { { 0 | (3 << 4) }, { 37, 0 }, 4}, |
| 10 | { { 0 | (4 << 4) }, { 67, 0 }, 0}, | 10 | { { 0 | (4 << 4) }, { 67, 0 }, 4}, |
| 11 | { { 0 | (5 << 4) }, { 82, 0 }, 0}, | 11 | { { 0 | (5 << 4) }, { 82, 0 }, 4}, |
| 12 | { { 0 | (6 << 4) }, { 104, 0 }, 1}, | 12 | { { 0 | (6 << 4) }, { 104, 0 }, 1}, |
| 13 | { { 1 | (0 << 4) }, { 0, 16 }, 1}, | 13 | { { 1 | (0 << 4) }, { 0, 16 }, 1}, |
| 14 | { { 1 | (1 << 4) }, { 22, 16 }, 0}, | 14 | { { 1 | (1 << 4) }, { 22, 16 }, 4}, |
| 15 | { { 1 | (2 << 4) }, { 37, 16 }, 0}, | 15 | { { 1 | (2 << 4) }, { 37, 16 }, 4}, |
| 16 | { { 1 | (3 << 4) }, { 37, 16 }, 0}, | 16 | { { 1 | (3 << 4) }, { 37, 16 }, 4}, |
| 17 | { { 1 | (4 << 4) }, { 67, 16 }, 0}, | 17 | { { 1 | (4 << 4) }, { 67, 16 }, 4}, |
| 18 | { { 1 | (5 << 4) }, { 82, 16 }, 0}, | 18 | { { 1 | (5 << 4) }, { 82, 16 }, 4}, |
| 19 | { { 1 | (6 << 4) }, { 104, 16 }, 1}, | 19 | { { 1 | (6 << 4) }, { 104, 16 }, 1}, |
| 20 | { { 2 | (0 << 4) }, { 0, 32 }, 1}, | 20 | { { 2 | (0 << 4) }, { 0, 32 }, 1}, |
| 21 | { { 2 | (1 << 4) }, { 22, 32 }, 0}, | 21 | { { 2 | (1 << 4) }, { 22, 32 }, 4}, |
| 22 | { { 2 | (2 << 4) }, { 37, 32 }, 0}, | 22 | { { 2 | (2 << 4) }, { 37, 32 }, 4}, |
| 23 | { { 2 | (3 << 4) }, { 37, 32 }, 0}, | 23 | { { 2 | (3 << 4) }, { 37, 32 }, 4}, |
| 24 | { { 2 | (4 << 4) }, { 67, 32 }, 0}, | 24 | { { 2 | (4 << 4) }, { 67, 32 }, 4}, |
| 25 | { { 2 | (5 << 4) }, { 82, 32 }, 0}, | 25 | { { 2 | (5 << 4) }, { 82, 32 }, 4}, |
| 26 | { { 2 | (6 << 4) }, { 104, 32 }, 1}, | 26 | { { 2 | (6 << 4) }, { 104, 32 }, 1}, |
| 27 | { { 3 | (0 << 4) }, { 0, 48 }, 1}, | 27 | { { 3 | (0 << 4) }, { 0, 48 }, 1}, |
| 28 | { { 3 | (1 << 4) }, { 22, 48 }, 0}, | 28 | { { 3 | (1 << 4) }, { 22, 48 }, 4}, |
| 29 | { { 3 | (2 << 4) }, { 37, 48 }, 0}, | 29 | { { 3 | (2 << 4) }, { 37, 48 }, 4}, |
| 30 | { { 3 | (3 << 4) }, { 37, 48 }, 0}, | 30 | { { 3 | (3 << 4) }, { 37, 48 }, 4}, |
| 31 | { { 3 | (4 << 4) }, { 67, 48 }, 0}, | 31 | { { 3 | (4 << 4) }, { 67, 48 }, 4}, |
| 32 | { { 3 | (5 << 4) }, { 82, 48 }, 0}, | 32 | { { 3 | (5 << 4) }, { 82, 48 }, 4}, |
| 33 | { { 3 | (6 << 4) }, { 104, 48 }, 1}, | 33 | { { 3 | (6 << 4) }, { 104, 48 }, 1}, |
| 34 | { { 4 | (0 << 4) }, { 0, 64 }, 1}, | 34 | { { 4 | (0 << 4) }, { 0, 64 }, 1}, |
| 35 | { { 4 | (1 << 4) }, { 22, 64 }, 1}, | 35 | { { 4 | (1 << 4) }, { 22, 64 }, 1}, |
| @@ -42,32 +42,32 @@ | |||
| 42 | { { 5 | (6 << 4) }, { 97, 55 }, 1}, | 42 | { { 5 | (6 << 4) }, { 97, 55 }, 1}, |
| 43 | // Left Hand Mapped Right to Left | 43 | // Left Hand Mapped Right to Left |
| 44 | { { 6 | (0 << 4) }, { 224, 0 }, 1}, | 44 | { { 6 | (0 << 4) }, { 224, 0 }, 1}, |
| 45 | { { 6 | (1 << 4) }, { 202, 0 }, 0}, | 45 | { { 6 | (1 << 4) }, { 202, 0 }, 4}, |
| 46 | { { 6 | (2 << 4) }, { 187, 0 }, 0}, | 46 | { { 6 | (2 << 4) }, { 187, 0 }, 4}, |
| 47 | { { 6 | (3 << 4) }, { 172, 0 }, 0}, | 47 | { { 6 | (3 << 4) }, { 172, 0 }, 4}, |
| 48 | { { 6 | (4 << 4) }, { 157, 0 }, 0}, | 48 | { { 6 | (4 << 4) }, { 157, 0 }, 4}, |
| 49 | { { 6 | (5 << 4) }, { 142, 0 }, 0}, | 49 | { { 6 | (5 << 4) }, { 142, 0 }, 4}, |
| 50 | { { 6 | (6 << 4) }, { 120, 0 }, 1}, | 50 | { { 6 | (6 << 4) }, { 120, 0 }, 1}, |
| 51 | { { 7 | (0 << 4) }, { 224, 16 }, 1}, | 51 | { { 7 | (0 << 4) }, { 224, 16 }, 1}, |
| 52 | { { 7 | (1 << 4) }, { 202, 16 }, 0}, | 52 | { { 7 | (1 << 4) }, { 202, 16 }, 4}, |
| 53 | { { 7 | (2 << 4) }, { 187, 16 }, 0}, | 53 | { { 7 | (2 << 4) }, { 187, 16 }, 4}, |
| 54 | { { 7 | (3 << 4) }, { 172, 16 }, 0}, | 54 | { { 7 | (3 << 4) }, { 172, 16 }, 4}, |
| 55 | { { 7 | (4 << 4) }, { 157, 16 }, 0}, | 55 | { { 7 | (4 << 4) }, { 157, 16 }, 4}, |
| 56 | { { 7 | (5 << 4) }, { 142, 16 }, 0}, | 56 | { { 7 | (5 << 4) }, { 142, 16 }, 4}, |
| 57 | { { 7 | (6 << 4) }, { 120, 16 }, 1}, | 57 | { { 7 | (6 << 4) }, { 120, 16 }, 1}, |
| 58 | { { 8 | (0 << 4) }, { 224, 32 }, 1}, | 58 | { { 8 | (0 << 4) }, { 224, 32 }, 1}, |
| 59 | { { 8 | (1 << 4) }, { 202, 32 }, 0}, | 59 | { { 8 | (1 << 4) }, { 202, 32 }, 4}, |
| 60 | { { 8 | (2 << 4) }, { 187, 32 }, 0}, | 60 | { { 8 | (2 << 4) }, { 187, 32 }, 4}, |
| 61 | { { 8 | (3 << 4) }, { 172, 32 }, 0}, | 61 | { { 8 | (3 << 4) }, { 172, 32 }, 4}, |
| 62 | { { 8 | (4 << 4) }, { 157, 32 }, 0}, | 62 | { { 8 | (4 << 4) }, { 157, 32 }, 4}, |
| 63 | { { 8 | (5 << 4) }, { 142, 32 }, 0}, | 63 | { { 8 | (5 << 4) }, { 142, 32 }, 4}, |
| 64 | { { 8 | (6 << 4) }, { 120, 32 }, 1}, | 64 | { { 8 | (6 << 4) }, { 120, 32 }, 1}, |
| 65 | { { 9 | (0 << 4) }, { 224, 48 }, 1}, | 65 | { { 9 | (0 << 4) }, { 224, 48 }, 1}, |
| 66 | { { 9 | (1 << 4) }, { 202, 48 }, 0}, | 66 | { { 9 | (1 << 4) }, { 202, 48 }, 4}, |
| 67 | { { 9 | (2 << 4) }, { 187, 48 }, 0}, | 67 | { { 9 | (2 << 4) }, { 187, 48 }, 4}, |
| 68 | { { 9 | (3 << 4) }, { 172, 48 }, 0}, | 68 | { { 9 | (3 << 4) }, { 172, 48 }, 4}, |
| 69 | { { 9 | (4 << 4) }, { 157, 48 }, 0}, | 69 | { { 9 | (4 << 4) }, { 157, 48 }, 4}, |
| 70 | { { 9 | (5 << 4) }, { 142, 48 }, 0}, | 70 | { { 9 | (5 << 4) }, { 142, 48 }, 4}, |
| 71 | { { 9 | (6 << 4) }, { 120, 48 }, 1}, | 71 | { { 9 | (6 << 4) }, { 120, 48 }, 1}, |
| 72 | { { 10 | (0 << 4) }, { 224, 64 }, 1}, | 72 | { { 10 | (0 << 4) }, { 224, 64 }, 1}, |
| 73 | { { 10 | (1 << 4) }, { 202, 64 }, 1}, | 73 | { { 10 | (1 << 4) }, { 202, 64 }, 1}, |
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index e7f43ad66..26c2e3304 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c | |||
| @@ -405,10 +405,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { | |||
| 405 | rgb_led led; | 405 | rgb_led led; |
| 406 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 406 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 407 | led = g_rgb_leds[i]; | 407 | led = g_rgb_leds[i]; |
| 408 | if (led.matrix_co.raw < 0xFF) { | 408 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 409 | if (led.modifier) { | 409 | rgb_matrix_set_color( i, red, green, blue ); |
| 410 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 411 | } | ||
| 412 | } | 410 | } |
| 413 | } | 411 | } |
| 414 | } | 412 | } |
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 16defede9..f82b4e7da 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c | |||
| @@ -179,10 +179,8 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool def | |||
| 179 | rgb_led led; | 179 | rgb_led led; |
| 180 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | 180 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { |
| 181 | led = g_rgb_leds[i]; | 181 | led = g_rgb_leds[i]; |
| 182 | if (led.matrix_co.raw < 0xFF) { | 182 | if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) { |
| 183 | if (led.modifier) { | 183 | rgb_matrix_set_color( i, red, green, blue ); |
| 184 | rgb_matrix_set_color( i, red, green, blue ); | ||
| 185 | } | ||
| 186 | } | 184 | } |
| 187 | } | 185 | } |
| 188 | } | 186 | } |
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 5ca9b87a6..8c16c7790 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -162,28 +162,11 @@ void rgb_matrix_update_pwm_buffers(void) { | |||
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { | 164 | void rgb_matrix_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { |
| 165 | #ifdef RGB_MATRIX_EXTRA_TOG | ||
| 166 | const bool is_key = g_rgb_leds[index].matrix_co.raw != 0xff; | ||
| 167 | if ( | ||
| 168 | (rgb_matrix_config.enable == RGB_ZONE_KEYS && !is_key) || | ||
| 169 | (rgb_matrix_config.enable == RGB_ZONE_UNDER && is_key) | ||
| 170 | ) { | ||
| 171 | rgb_matrix_driver.set_color(index, 0, 0, 0); | ||
| 172 | return; | ||
| 173 | } | ||
| 174 | #endif | ||
| 175 | |||
| 176 | rgb_matrix_driver.set_color(index, red, green, blue); | 165 | rgb_matrix_driver.set_color(index, red, green, blue); |
| 177 | } | 166 | } |
| 178 | 167 | ||
| 179 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { | 168 | void rgb_matrix_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { |
| 180 | #ifdef RGB_MATRIX_EXTRA_TOG | ||
| 181 | for (int i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 182 | rgb_matrix_set_color(i, red, green, blue); | ||
| 183 | } | ||
| 184 | #else | ||
| 185 | rgb_matrix_driver.set_color_all(red, green, blue); | 169 | rgb_matrix_driver.set_color_all(red, green, blue); |
| 186 | #endif | ||
| 187 | } | 170 | } |
| 188 | 171 | ||
| 189 | bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { | 172 | bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) { |
| @@ -262,7 +245,7 @@ static bool rgb_matrix_none(effect_params_t* params) { | |||
| 262 | 245 | ||
| 263 | static uint8_t rgb_last_enable = UINT8_MAX; | 246 | static uint8_t rgb_last_enable = UINT8_MAX; |
| 264 | static uint8_t rgb_last_effect = UINT8_MAX; | 247 | static uint8_t rgb_last_effect = UINT8_MAX; |
| 265 | static effect_params_t rgb_effect_params = { 0, 0 }; | 248 | static effect_params_t rgb_effect_params = { 0, 0xFF }; |
| 266 | static rgb_task_states rgb_task_state = SYNCING; | 249 | static rgb_task_states rgb_task_state = SYNCING; |
| 267 | 250 | ||
| 268 | static void rgb_task_timers(void) { | 251 | static void rgb_task_timers(void) { |
| @@ -575,29 +558,31 @@ void rgb_matrix_set_suspend_state(bool state) { | |||
| 575 | } | 558 | } |
| 576 | 559 | ||
| 577 | void rgb_matrix_toggle(void) { | 560 | void rgb_matrix_toggle(void) { |
| 578 | rgb_matrix_config.enable++; | 561 | rgb_matrix_config.enable ^= 1; |
| 579 | if (!rgb_matrix_config.enable) { | 562 | rgb_task_state = STARTING; |
| 580 | rgb_task_state = STARTING; | ||
| 581 | } | ||
| 582 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 563 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 583 | } | 564 | } |
| 584 | 565 | ||
| 585 | void rgb_matrix_enable(void) { | 566 | void rgb_matrix_enable(void) { |
| 586 | rgb_matrix_config.enable = 1; | 567 | rgb_matrix_enable_noeeprom(); |
| 587 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 568 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 588 | } | 569 | } |
| 589 | 570 | ||
| 590 | void rgb_matrix_enable_noeeprom(void) { | 571 | void rgb_matrix_enable_noeeprom(void) { |
| 591 | rgb_matrix_config.enable = 1; | 572 | if (!rgb_matrix_config.enable) |
| 573 | rgb_task_state = STARTING; | ||
| 574 | rgb_matrix_config.enable = 1; | ||
| 592 | } | 575 | } |
| 593 | 576 | ||
| 594 | void rgb_matrix_disable(void) { | 577 | void rgb_matrix_disable(void) { |
| 595 | rgb_matrix_config.enable = 0; | 578 | rgb_matrix_disable_noeeprom(); |
| 596 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 579 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 597 | } | 580 | } |
| 598 | 581 | ||
| 599 | void rgb_matrix_disable_noeeprom(void) { | 582 | void rgb_matrix_disable_noeeprom(void) { |
| 600 | rgb_matrix_config.enable = 0; | 583 | if (rgb_matrix_config.enable) |
| 584 | rgb_task_state = STARTING; | ||
| 585 | rgb_matrix_config.enable = 0; | ||
| 601 | } | 586 | } |
| 602 | 587 | ||
| 603 | void rgb_matrix_step(void) { | 588 | void rgb_matrix_step(void) { |
| @@ -658,6 +643,14 @@ void rgb_matrix_decrease_speed(void) { | |||
| 658 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this | 643 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw);//EECONFIG needs to be increased to support this |
| 659 | } | 644 | } |
| 660 | 645 | ||
| 646 | led_flags_t rgb_matrix_get_flags(void) { | ||
| 647 | return rgb_effect_params.flags; | ||
| 648 | } | ||
| 649 | |||
| 650 | void rgb_matrix_set_flags(led_flags_t flags) { | ||
| 651 | rgb_effect_params.flags = flags; | ||
| 652 | } | ||
| 653 | |||
| 661 | void rgb_matrix_mode(uint8_t mode) { | 654 | void rgb_matrix_mode(uint8_t mode) { |
| 662 | rgb_matrix_config.mode = mode; | 655 | rgb_matrix_config.mode = mode; |
| 663 | rgb_task_state = STARTING; | 656 | rgb_task_state = STARTING; |
diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 775cbeac0..33665ffff 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h | |||
| @@ -54,7 +54,9 @@ | |||
| 54 | uint8_t max = DRIVER_LED_TOTAL; | 54 | uint8_t max = DRIVER_LED_TOTAL; |
| 55 | #endif | 55 | #endif |
| 56 | 56 | ||
| 57 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 57 | #define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) continue |
| 58 | |||
| 59 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | ||
| 58 | 60 | ||
| 59 | typedef struct | 61 | typedef struct |
| 60 | { | 62 | { |
| @@ -209,6 +211,8 @@ void rgb_matrix_increase_val(void); | |||
| 209 | void rgb_matrix_decrease_val(void); | 211 | void rgb_matrix_decrease_val(void); |
| 210 | void rgb_matrix_increase_speed(void); | 212 | void rgb_matrix_increase_speed(void); |
| 211 | void rgb_matrix_decrease_speed(void); | 213 | void rgb_matrix_decrease_speed(void); |
| 214 | led_flags_t rgb_matrix_get_flags(void); | ||
| 215 | void rgb_matrix_set_flags(led_flags_t flags); | ||
| 212 | void rgb_matrix_mode(uint8_t mode); | 216 | void rgb_matrix_mode(uint8_t mode); |
| 213 | void rgb_matrix_mode_noeeprom(uint8_t mode); | 217 | void rgb_matrix_mode_noeeprom(uint8_t mode); |
| 214 | uint8_t rgb_matrix_get_mode(void); | 218 | uint8_t rgb_matrix_get_mode(void); |
diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h index cc1914d7f..4bd01c4fc 100644 --- a/quantum/rgb_matrix_animations/alpha_mods_anim.h +++ b/quantum/rgb_matrix_animations/alpha_mods_anim.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS | 2 | #ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS |
| 3 | 3 | ||
| 4 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 4 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 5 | extern rgb_config_t rgb_matrix_config; | 5 | extern rgb_config_t rgb_matrix_config; |
| 6 | 6 | ||
| 7 | // alphas = color1, mods = color2 | 7 | // alphas = color1, mods = color2 |
| @@ -14,7 +14,8 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) { | |||
| 14 | RGB rgb2 = hsv_to_rgb(hsv); | 14 | RGB rgb2 = hsv_to_rgb(hsv); |
| 15 | 15 | ||
| 16 | for (uint8_t i = led_min; i < led_max; i++) { | 16 | for (uint8_t i = led_min; i < led_max; i++) { |
| 17 | if (g_rgb_leds[i].modifier) { | 17 | RGB_MATRIX_TEST_LED_FLAGS(); |
| 18 | if (HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_MODIFIER)) { | ||
| 18 | rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); | 19 | rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); |
| 19 | } else { | 20 | } else { |
| 20 | rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); | 21 | rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); |
diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h index 4a9a1dcdb..54d60f927 100644 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ b/quantum/rgb_matrix_animations/breathing_anim.h | |||
| @@ -12,6 +12,7 @@ bool rgb_matrix_breathing(effect_params_t* params) { | |||
| 12 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; | 12 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, val }; |
| 13 | RGB rgb = hsv_to_rgb(hsv); | 13 | RGB rgb = hsv_to_rgb(hsv); |
| 14 | for (uint8_t i = led_min; i < led_max; i++) { | 14 | for (uint8_t i = led_min; i < led_max; i++) { |
| 15 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 15 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 16 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); |
| 16 | } | 17 | } |
| 17 | return led_max < DRIVER_LED_TOTAL; | 18 | return led_max < DRIVER_LED_TOTAL; |
diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h index 5c18cfa0c..513dff128 100644 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ b/quantum/rgb_matrix_animations/cycle_all_anim.h | |||
| @@ -2,16 +2,16 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL | 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_ALL |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_cycle_all(effect_params_t* params) { | 8 | bool rgb_matrix_cycle_all(effect_params_t* params) { |
| 9 | RGB_MATRIX_USE_LIMITS(led_min, led_max); | 9 | RGB_MATRIX_USE_LIMITS(led_min, led_max); |
| 10 | 10 | ||
| 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; | 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); | 12 | hsv.h = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); |
| 13 | for (uint8_t i = led_min; i < led_max; i++) { | 13 | for (uint8_t i = led_min; i < led_max; i++) { |
| 14 | hsv.h = time; | 14 | RGB_MATRIX_TEST_LED_FLAGS(); |
| 15 | RGB rgb = hsv_to_rgb(hsv); | 15 | RGB rgb = hsv_to_rgb(hsv); |
| 16 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 16 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); |
| 17 | } | 17 | } |
diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h index f519aeb47..428adea22 100644 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix_animations/cycle_left_right_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_cycle_left_right(effect_params_t* params) { | 8 | bool rgb_matrix_cycle_left_right(effect_params_t* params) { |
| @@ -11,6 +11,7 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) { | |||
| 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; | 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); | 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); |
| 13 | for (uint8_t i = led_min; i < led_max; i++) { | 13 | for (uint8_t i = led_min; i < led_max; i++) { |
| 14 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 14 | point_t point = g_rgb_leds[i].point; | 15 | point_t point = g_rgb_leds[i].point; |
| 15 | hsv.h = point.x - time; | 16 | hsv.h = point.x - time; |
| 16 | RGB rgb = hsv_to_rgb(hsv); | 17 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h index 8b91d890d..ea63095d2 100644 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix_animations/cycle_up_down_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN | 2 | #ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_cycle_up_down(effect_params_t* params) { | 8 | bool rgb_matrix_cycle_up_down(effect_params_t* params) { |
| @@ -11,6 +11,7 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) { | |||
| 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; | 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); | 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); |
| 13 | for (uint8_t i = led_min; i < led_max; i++) { | 13 | for (uint8_t i = led_min; i < led_max; i++) { |
| 14 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 14 | point_t point = g_rgb_leds[i].point; | 15 | point_t point = g_rgb_leds[i].point; |
| 15 | hsv.h = point.y - time; | 16 | hsv.h = point.y - time; |
| 16 | RGB rgb = hsv_to_rgb(hsv); | 17 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h index dda315780..00f6e5088 100644 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix_animations/dual_beacon_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON | 2 | #ifndef DISABLE_RGB_MATRIX_DUAL_BEACON |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_dual_beacon(effect_params_t* params) { | 8 | bool rgb_matrix_dual_beacon(effect_params_t* params) { |
| @@ -13,6 +13,7 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) { | |||
| 13 | int8_t cos_value = cos8(time) - 128; | 13 | int8_t cos_value = cos8(time) - 128; |
| 14 | int8_t sin_value = sin8(time) - 128; | 14 | int8_t sin_value = sin8(time) - 128; |
| 15 | for (uint8_t i = led_min; i < led_max; i++) { | 15 | for (uint8_t i = led_min; i < led_max; i++) { |
| 16 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 16 | point_t point = g_rgb_leds[i].point; | 17 | point_t point = g_rgb_leds[i].point; |
| 17 | hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; | 18 | hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; |
| 18 | RGB rgb = hsv_to_rgb(hsv); | 19 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h index 11498e22f..05117540a 100644 --- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h +++ b/quantum/rgb_matrix_animations/gradient_up_down_anim.h | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN | 2 | #ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN |
| 3 | 3 | ||
| 4 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 4 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 5 | extern rgb_config_t rgb_matrix_config; | 5 | extern rgb_config_t rgb_matrix_config; |
| 6 | 6 | ||
| 7 | bool rgb_matrix_gradient_up_down(effect_params_t* params) { | 7 | bool rgb_matrix_gradient_up_down(effect_params_t* params) { |
| @@ -10,6 +10,7 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) { | |||
| 10 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; | 10 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 11 | uint8_t scale = scale8(64, rgb_matrix_config.speed); | 11 | uint8_t scale = scale8(64, rgb_matrix_config.speed); |
| 12 | for (uint8_t i = led_min; i < led_max; i++) { | 12 | for (uint8_t i = led_min; i < led_max; i++) { |
| 13 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 13 | point_t point = g_rgb_leds[i].point; | 14 | point_t point = g_rgb_leds[i].point; |
| 14 | // The y range will be 0..64, map this to 0..4 | 15 | // The y range will be 0..64, map this to 0..4 |
| 15 | // Relies on hue being 8-bit and wrapping | 16 | // Relies on hue being 8-bit and wrapping |
diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h index 01ff5c230..dffa53264 100644 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h | |||
| @@ -2,10 +2,11 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | 2 | #ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | static void jellybean_raindrops_set_color(int i) { | 8 | static void jellybean_raindrops_set_color(int i, effect_params_t* params) { |
| 9 | if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return; | ||
| 9 | HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; | 10 | HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val }; |
| 10 | RGB rgb = hsv_to_rgb(hsv); | 11 | RGB rgb = hsv_to_rgb(hsv); |
| 11 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 12 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); |
| @@ -15,14 +16,14 @@ bool rgb_matrix_jellybean_raindrops(effect_params_t* params) { | |||
| 15 | if (!params->init) { | 16 | if (!params->init) { |
| 16 | // Change one LED every tick, make sure speed is not 0 | 17 | // Change one LED every tick, make sure speed is not 0 |
| 17 | if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { | 18 | if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { |
| 18 | jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL); | 19 | jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); |
| 19 | } | 20 | } |
| 20 | return false; | 21 | return false; |
| 21 | } | 22 | } |
| 22 | 23 | ||
| 23 | RGB_MATRIX_USE_LIMITS(led_min, led_max); | 24 | RGB_MATRIX_USE_LIMITS(led_min, led_max); |
| 24 | for (int i = led_min; i < led_max; i++) { | 25 | for (int i = led_min; i < led_max; i++) { |
| 25 | jellybean_raindrops_set_color(i); | 26 | jellybean_raindrops_set_color(i, params); |
| 26 | } | 27 | } |
| 27 | return led_max < DRIVER_LED_TOTAL; | 28 | return led_max < DRIVER_LED_TOTAL; |
| 28 | } | 29 | } |
diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h index 3c15e64ab..89f6965c3 100644 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON | 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_rainbow_beacon(effect_params_t* params) { | 8 | bool rgb_matrix_rainbow_beacon(effect_params_t* params) { |
| @@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) { | |||
| 13 | int16_t cos_value = 2 * (cos8(time) - 128); | 13 | int16_t cos_value = 2 * (cos8(time) - 128); |
| 14 | int16_t sin_value = 2 * (sin8(time) - 128); | 14 | int16_t sin_value = 2 * (sin8(time) - 128); |
| 15 | for (uint8_t i = led_min; i < led_max; i++) { | 15 | for (uint8_t i = led_min; i < led_max; i++) { |
| 16 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 16 | point_t point = g_rgb_leds[i].point; | 17 | point_t point = g_rgb_leds[i].point; |
| 17 | hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; | 18 | hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue; |
| 18 | RGB rgb = hsv_to_rgb(hsv); | 19 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h index 0d11d5280..0d57aef57 100644 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { | 8 | bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { |
| @@ -11,6 +11,7 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) { | |||
| 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; | 11 | HSV hsv = { 0, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); | 12 | uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4); |
| 13 | for (uint8_t i = led_min; i < led_max; i++) { | 13 | for (uint8_t i = led_min; i < led_max; i++) { |
| 14 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 14 | point_t point = g_rgb_leds[i].point; | 15 | point_t point = g_rgb_leds[i].point; |
| 15 | hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue; | 16 | hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue; |
| 16 | RGB rgb = hsv_to_rgb(hsv); | 17 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h index d7cd42cbe..03652758c 100644 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS | 2 | #ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS |
| 3 | 3 | ||
| 4 | extern rgb_counters_t g_rgb_counters; | 4 | extern rgb_counters_t g_rgb_counters; |
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { | 8 | bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { |
| @@ -13,6 +13,7 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) { | |||
| 13 | int16_t cos_value = 3 * (cos8(time) - 128); | 13 | int16_t cos_value = 3 * (cos8(time) - 128); |
| 14 | int16_t sin_value = 3 * (sin8(time) - 128); | 14 | int16_t sin_value = 3 * (sin8(time) - 128); |
| 15 | for (uint8_t i = led_min; i < led_max; i++) { | 15 | for (uint8_t i = led_min; i < led_max; i++) { |
| 16 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 16 | point_t point = g_rgb_leds[i].point; | 17 | point_t point = g_rgb_leds[i].point; |
| 17 | hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; | 18 | hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue; |
| 18 | RGB rgb = hsv_to_rgb(hsv); | 19 | RGB rgb = hsv_to_rgb(hsv); |
diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h index fc721375b..0e3a87864 100644 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ b/quantum/rgb_matrix_animations/raindrops_anim.h | |||
| @@ -5,7 +5,8 @@ | |||
| 5 | extern rgb_counters_t g_rgb_counters; | 5 | extern rgb_counters_t g_rgb_counters; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | 7 | ||
| 8 | static void raindrops_set_color(int i) { | 8 | static void raindrops_set_color(int i, effect_params_t* params) { |
| 9 | if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return; | ||
| 9 | HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; | 10 | HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 10 | 11 | ||
| 11 | // Take the shortest path between hues | 12 | // Take the shortest path between hues |
| @@ -25,14 +26,14 @@ bool rgb_matrix_raindrops(effect_params_t* params) { | |||
| 25 | if (!params->init) { | 26 | if (!params->init) { |
| 26 | // Change one LED every tick, make sure speed is not 0 | 27 | // Change one LED every tick, make sure speed is not 0 |
| 27 | if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { | 28 | if (scale16by8(g_rgb_counters.tick, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { |
| 28 | raindrops_set_color(rand() % DRIVER_LED_TOTAL); | 29 | raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); |
| 29 | } | 30 | } |
| 30 | return false; | 31 | return false; |
| 31 | } | 32 | } |
| 32 | 33 | ||
| 33 | RGB_MATRIX_USE_LIMITS(led_min, led_max); | 34 | RGB_MATRIX_USE_LIMITS(led_min, led_max); |
| 34 | for (int i = led_min; i < led_max; i++) { | 35 | for (int i = led_min; i < led_max; i++) { |
| 35 | raindrops_set_color(i); | 36 | raindrops_set_color(i, params); |
| 36 | } | 37 | } |
| 37 | return led_max < DRIVER_LED_TOTAL; | 38 | return led_max < DRIVER_LED_TOTAL; |
| 38 | } | 39 | } |
diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix_animations/solid_color_anim.h index 24a197beb..033c1f933 100644 --- a/quantum/rgb_matrix_animations/solid_color_anim.h +++ b/quantum/rgb_matrix_animations/solid_color_anim.h | |||
| @@ -8,6 +8,7 @@ bool rgb_matrix_solid_color(effect_params_t* params) { | |||
| 8 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; | 8 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, rgb_matrix_config.val }; |
| 9 | RGB rgb = hsv_to_rgb(hsv); | 9 | RGB rgb = hsv_to_rgb(hsv); |
| 10 | for (uint8_t i = led_min; i < led_max; i++) { | 10 | for (uint8_t i = led_min; i < led_max; i++) { |
| 11 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 11 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | 12 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); |
| 12 | } | 13 | } |
| 13 | return led_max < DRIVER_LED_TOTAL; | 14 | return led_max < DRIVER_LED_TOTAL; |
diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix_animations/solid_reactive_anim.h index 220e54233..836409dd6 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_anim.h | |||
| @@ -13,6 +13,7 @@ bool rgb_matrix_solid_reactive(effect_params_t* params) { | |||
| 13 | uint16_t max_tick = 65535 / rgb_matrix_config.speed; | 13 | uint16_t max_tick = 65535 / rgb_matrix_config.speed; |
| 14 | // Relies on hue being 8-bit and wrapping | 14 | // Relies on hue being 8-bit and wrapping |
| 15 | for (uint8_t i = led_min; i < led_max; i++) { | 15 | for (uint8_t i = led_min; i < led_max; i++) { |
| 16 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 16 | uint16_t tick = max_tick; | 17 | uint16_t tick = max_tick; |
| 17 | for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { | 18 | for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { |
| 18 | if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { | 19 | if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { |
diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix_animations/solid_reactive_cross.h index af602cba1..1dec1886d 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix_animations/solid_reactive_cross.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED | 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED |
| 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) | 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) |
| 4 | 4 | ||
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | extern last_hit_t g_last_hit_tracker; | 7 | extern last_hit_t g_last_hit_tracker; |
| 8 | 8 | ||
| @@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par | |||
| 15 | hsv.v = 0; | 15 | hsv.v = 0; |
| 16 | point_t point = g_rgb_leds[i].point; | 16 | point_t point = g_rgb_leds[i].point; |
| 17 | for (uint8_t j = start; j < count; j++) { | 17 | for (uint8_t j = start; j < count; j++) { |
| 18 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 18 | int16_t dx = point.x - g_last_hit_tracker.x[j]; | 19 | int16_t dx = point.x - g_last_hit_tracker.x[j]; |
| 19 | int16_t dy = point.y - g_last_hit_tracker.y[j]; | 20 | int16_t dy = point.y - g_last_hit_tracker.y[j]; |
| 20 | uint8_t dist = sqrt16(dx * dx + dy * dy); | 21 | uint8_t dist = sqrt16(dx * dx + dy * dy); |
diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix_animations/solid_reactive_nexus.h index 8b4a139dc..8952a1e2b 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix_animations/solid_reactive_nexus.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED | 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED |
| 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) | 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) |
| 4 | 4 | ||
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | extern last_hit_t g_last_hit_tracker; | 7 | extern last_hit_t g_last_hit_tracker; |
| 8 | 8 | ||
| @@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par | |||
| 15 | hsv.v = 0; | 15 | hsv.v = 0; |
| 16 | point_t point = g_rgb_leds[i].point; | 16 | point_t point = g_rgb_leds[i].point; |
| 17 | for (uint8_t j = start; j < count; j++) { | 17 | for (uint8_t j = start; j < count; j++) { |
| 18 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 18 | int16_t dx = point.x - g_last_hit_tracker.x[j]; | 19 | int16_t dx = point.x - g_last_hit_tracker.x[j]; |
| 19 | int16_t dy = point.y - g_last_hit_tracker.y[j]; | 20 | int16_t dy = point.y - g_last_hit_tracker.y[j]; |
| 20 | uint8_t dist = sqrt16(dx * dx + dy * dy); | 21 | uint8_t dist = sqrt16(dx * dx + dy * dy); |
diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h index e84cd6939..d7bdb414e 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h | |||
| @@ -12,6 +12,7 @@ bool rgb_matrix_solid_reactive_simple(effect_params_t* params) { | |||
| 12 | // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 | 12 | // Max tick based on speed scale ensures results from scale16by8 with rgb_matrix_config.speed are no greater than 255 |
| 13 | uint16_t max_tick = 65535 / rgb_matrix_config.speed; | 13 | uint16_t max_tick = 65535 / rgb_matrix_config.speed; |
| 14 | for (uint8_t i = led_min; i < led_max; i++) { | 14 | for (uint8_t i = led_min; i < led_max; i++) { |
| 15 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 15 | uint16_t tick = max_tick; | 16 | uint16_t tick = max_tick; |
| 16 | for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { | 17 | for(uint8_t j = 0; j < g_last_hit_tracker.count; j++) { |
| 17 | if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { | 18 | if (g_last_hit_tracker.index[j] == i && g_last_hit_tracker.tick[j] < tick) { |
diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix_animations/solid_reactive_wide.h index abb01892e..d86cb1284 100644 --- a/quantum/rgb_matrix_animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix_animations/solid_reactive_wide.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED | 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED |
| 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) | 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) |
| 4 | 4 | ||
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | extern last_hit_t g_last_hit_tracker; | 7 | extern last_hit_t g_last_hit_tracker; |
| 8 | 8 | ||
| @@ -15,6 +15,7 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para | |||
| 15 | hsv.v = 0; | 15 | hsv.v = 0; |
| 16 | point_t point = g_rgb_leds[i].point; | 16 | point_t point = g_rgb_leds[i].point; |
| 17 | for (uint8_t j = start; j < count; j++) { | 17 | for (uint8_t j = start; j < count; j++) { |
| 18 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 18 | int16_t dx = point.x - g_last_hit_tracker.x[j]; | 19 | int16_t dx = point.x - g_last_hit_tracker.x[j]; |
| 19 | int16_t dy = point.y - g_last_hit_tracker.y[j]; | 20 | int16_t dy = point.y - g_last_hit_tracker.y[j]; |
| 20 | uint8_t dist = sqrt16(dx * dx + dy * dy); | 21 | uint8_t dist = sqrt16(dx * dx + dy * dy); |
diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix_animations/solid_splash_anim.h index 82ac055b8..14312f33d 100644 --- a/quantum/rgb_matrix_animations/solid_splash_anim.h +++ b/quantum/rgb_matrix_animations/solid_splash_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED | 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED |
| 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) | 3 | #if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) |
| 4 | 4 | ||
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | extern last_hit_t g_last_hit_tracker; | 7 | extern last_hit_t g_last_hit_tracker; |
| 8 | 8 | ||
| @@ -12,6 +12,7 @@ static bool rgb_matrix_solid_multisplash_range(uint8_t start, effect_params_t* p | |||
| 12 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; | 12 | HSV hsv = { rgb_matrix_config.hue, rgb_matrix_config.sat, 0 }; |
| 13 | uint8_t count = g_last_hit_tracker.count; | 13 | uint8_t count = g_last_hit_tracker.count; |
| 14 | for (uint8_t i = led_min; i < led_max; i++) { | 14 | for (uint8_t i = led_min; i < led_max; i++) { |
| 15 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 15 | hsv.v = 0; | 16 | hsv.v = 0; |
| 16 | point_t point = g_rgb_leds[i].point; | 17 | point_t point = g_rgb_leds[i].point; |
| 17 | for (uint8_t j = start; j < count; j++) { | 18 | for (uint8_t j = start; j < count; j++) { |
diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix_animations/splash_anim.h index 829d30eef..3c96d451e 100644 --- a/quantum/rgb_matrix_animations/splash_anim.h +++ b/quantum/rgb_matrix_animations/splash_anim.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED | 2 | #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED |
| 3 | #if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) | 3 | #if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) |
| 4 | 4 | ||
| 5 | extern const rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; | 5 | extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL]; |
| 6 | extern rgb_config_t rgb_matrix_config; | 6 | extern rgb_config_t rgb_matrix_config; |
| 7 | extern last_hit_t g_last_hit_tracker; | 7 | extern last_hit_t g_last_hit_tracker; |
| 8 | 8 | ||
| @@ -12,6 +12,7 @@ static bool rgb_matrix_multisplash_range(uint8_t start, effect_params_t* params) | |||
| 12 | HSV hsv = { 0, rgb_matrix_config.sat, 0 }; | 12 | HSV hsv = { 0, rgb_matrix_config.sat, 0 }; |
| 13 | uint8_t count = g_last_hit_tracker.count; | 13 | uint8_t count = g_last_hit_tracker.count; |
| 14 | for (uint8_t i = led_min; i < led_max; i++) { | 14 | for (uint8_t i = led_min; i < led_max; i++) { |
| 15 | RGB_MATRIX_TEST_LED_FLAGS(); | ||
| 15 | hsv.h = rgb_matrix_config.hue; | 16 | hsv.h = rgb_matrix_config.hue; |
| 16 | hsv.v = 0; | 17 | hsv.v = 0; |
| 17 | point_t point = g_rgb_leds[i].point; | 18 | point_t point = g_rgb_leds[i].point; |
diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix_types.h index 908e96da5..7a3bc6714 100644 --- a/quantum/rgb_matrix_types.h +++ b/quantum/rgb_matrix_types.h | |||
| @@ -67,19 +67,21 @@ typedef union { | |||
| 67 | }; | 67 | }; |
| 68 | } matrix_co_t; | 68 | } matrix_co_t; |
| 69 | 69 | ||
| 70 | #define HAS_FLAGS(bits, flags) ((bits & flags) == flags) | ||
| 71 | #define HAS_ANY_FLAGS(bits, flags) ((bits & flags) != 0x00) | ||
| 72 | |||
| 73 | #define LED_FLAG_ALL 0xFF | ||
| 74 | #define LED_FLAG_NONE 0x00 | ||
| 75 | #define LED_FLAG_MODIFIER 0x01 | ||
| 76 | #define LED_FLAG_UNDERGLOW 0x02 | ||
| 77 | #define LED_FLAG_KEYLIGHT 0x04 | ||
| 78 | |||
| 70 | typedef struct PACKED { | 79 | typedef struct PACKED { |
| 71 | matrix_co_t matrix_co; | 80 | matrix_co_t matrix_co; |
| 72 | point_t point; | 81 | point_t point; |
| 73 | uint8_t modifier:1; | 82 | uint8_t flags; |
| 74 | } rgb_led; | 83 | } rgb_led; |
| 75 | 84 | ||
| 76 | typedef enum { | ||
| 77 | RGB_ZONE_OFF = 0, | ||
| 78 | RGB_ZONE_ALL, | ||
| 79 | RGB_ZONE_KEYS, | ||
| 80 | RGB_ZONE_UNDER, | ||
| 81 | } rgb_zone_t; | ||
| 82 | |||
| 83 | typedef union { | 85 | typedef union { |
| 84 | uint32_t raw; | 86 | uint32_t raw; |
| 85 | struct PACKED { | 87 | struct PACKED { |
diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index e29fb6587..a2eab1b56 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c | |||
| @@ -443,9 +443,9 @@ static void led_matrix_massdrop_config_override(int i) | |||
| 443 | 443 | ||
| 444 | uint8_t highest_active_layer = biton32(layer_state); | 444 | uint8_t highest_active_layer = biton32(layer_state); |
| 445 | 445 | ||
| 446 | if (led_lighting_mode == LED_MODE_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw == 0xff) { | 446 | if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) { |
| 447 | //Do not act on this LED | 447 | //Do not act on this LED |
| 448 | } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && g_rgb_leds[i].matrix_co.raw != 0xff) { | 448 | } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_UNDERGLOW)) { |
| 449 | //Do not act on this LED | 449 | //Do not act on this LED |
| 450 | } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { | 450 | } else if (led_lighting_mode == LED_MODE_INDICATORS_ONLY) { |
| 451 | //Do not act on this LED (Only show indicators) | 451 | //Do not act on this LED (Only show indicators) |
