Skip to content

Commit

Permalink
Moved RGB coords and flags into info.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fpb committed Nov 18, 2023
1 parent ddb1a1f commit 4373488
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 25 deletions.
24 changes: 0 additions & 24 deletions keyboards/royal_kludge/rk68_rgb/config_led.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "rgb_matrix.h"
# include "config_led.h"

led_config_t g_led_config = {
{
{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29},
{30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43},
{44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57},
{58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67}
},
{
{0, 0}, {14, 0}, {29, 0}, { 44, 0}, { 59, 0}, { 74, 0}, { 89, 0}, {104, 0}, {119, 0}, {134, 0}, {149, 0}, {164, 0}, {179, 0}, {201, 0}, {224, 0},
{3,16}, {22,16}, {37,16}, { 52,16}, { 67,16}, { 82,16}, { 97,16}, {112,16}, {126,16}, {141,16}, {156,16}, {171,16}, {186,16}, {205,16}, {224,16},
{5,32}, {26,32}, {41,32}, { 55,32}, { 70,32}, { 85,32}, {100,32}, {115,32}, {130,32}, {145,32}, {160,32}, {175,32}, {199,32}, {224,32},
{9,48}, {33,48}, {48,48}, { 63,48}, { 78,48}, { 93,48}, {108,48}, {123,48}, {138,48}, {153,48}, {167,48}, {188,48}, {209,48}, {224,48},
{1,64}, {20,64}, {39,64}, { 95,64}, {149,64}, {164,64}, {179,64}, {194,64}, {209,64}, {224,64}
},
{
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
}
};

bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (host_keyboard_led_state().caps_lock) {
// Set capslock key to orange (capslock is led number 30)
Expand Down
72 changes: 71 additions & 1 deletion keyboards/royal_kludge/rk68_rgb/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,77 @@
"splash" : true,
"typing_heatmap" : true,
},
"driver": "sn32f24xb"
"driver": "sn32f24xb",
"layout": [
{ "matrix": [0,0], "x": 0, "y": 0, "flags": 4},
{ "matrix": [0,1], "x": 14, "y": 0, "flags": 4},
{ "matrix": [0,2], "x": 29, "y": 0, "flags": 4},
{ "matrix": [0,3], "x": 44, "y": 0, "flags": 4},
{ "matrix": [0,4], "x": 59, "y": 0, "flags": 4},
{ "matrix": [0,5], "x": 74, "y": 0, "flags": 4},
{ "matrix": [0,6], "x": 89, "y": 0, "flags": 4},
{ "matrix": [0,7], "x": 104, "y": 0, "flags": 4},
{ "matrix": [0,8], "x": 119, "y": 0, "flags": 4},
{ "matrix": [0,9], "x": 134, "y": 0, "flags": 4},
{ "matrix": [0,10], "x": 149, "y": 0, "flags": 4},
{ "matrix": [0,11], "x": 164, "y": 0, "flags": 4},
{ "matrix": [0,12], "x": 179, "y": 0, "flags": 4},
{ "matrix": [0,13], "x": 201, "y": 0, "flags": 4},
{ "matrix": [0,14], "x": 224, "y": 0, "flags": 4},
{ "matrix": [1,0], "x": 3, "y": 16, "flags": 4},
{ "matrix": [1,1], "x": 22, "y": 16, "flags": 4},
{ "matrix": [1,2], "x": 37, "y": 16, "flags": 4},
{ "matrix": [1,3], "x": 52, "y": 16, "flags": 4},
{ "matrix": [1,4], "x": 67, "y": 16, "flags": 4},
{ "matrix": [1,5], "x": 82, "y": 16, "flags": 4},
{ "matrix": [1,6], "x": 97, "y": 16, "flags": 4},
{ "matrix": [1,7], "x": 112, "y": 16, "flags": 4},
{ "matrix": [1,8], "x": 126, "y": 16, "flags": 4},
{ "matrix": [1,9], "x": 141, "y": 16, "flags": 4},
{ "matrix": [1,10], "x": 156, "y": 16, "flags": 4},
{ "matrix": [1,11], "x": 171, "y": 16, "flags": 4},
{ "matrix": [1,12], "x": 186, "y": 16, "flags": 4},
{ "matrix": [1,13], "x": 205, "y": 16, "flags": 4},
{ "matrix": [1,14], "x": 224, "y": 16, "flags": 4},
{ "matrix": [2,0], "x": 5, "y": 32, "flags": 8},
{ "matrix": [2,1], "x": 26, "y": 32, "flags": 4},
{ "matrix": [2,2], "x": 41, "y": 32, "flags": 4},
{ "matrix": [2,3], "x": 55, "y": 32, "flags": 4},
{ "matrix": [2,4], "x": 70, "y": 32, "flags": 4},
{ "matrix": [2,5], "x": 85, "y": 32, "flags": 4},
{ "matrix": [2,6], "x": 100, "y": 32, "flags": 4},
{ "matrix": [2,7], "x": 115, "y": 32, "flags": 4},
{ "matrix": [2,8], "x": 130, "y": 32, "flags": 4},
{ "matrix": [2,9], "x": 145, "y": 32, "flags": 4},
{ "matrix": [2,10], "x": 160, "y": 32, "flags": 4},
{ "matrix": [2,11], "x": 175, "y": 32, "flags": 4},
{ "matrix": [2,13], "x": 199, "y": 32, "flags": 4},
{ "matrix": [2,14], "x": 224, "y": 32, "flags": 4},
{ "matrix": [3,0], "x": 9, "y": 48, "flags": 4},
{ "matrix": [3,2], "x": 33, "y": 48, "flags": 4},
{ "matrix": [3,3], "x": 48, "y": 48, "flags": 4},
{ "matrix": [3,4], "x": 63, "y": 48, "flags": 4},
{ "matrix": [3,5], "x": 78, "y": 48, "flags": 4},
{ "matrix": [3,6], "x": 93, "y": 48, "flags": 4},
{ "matrix": [3,7], "x": 108, "y": 48, "flags": 4},
{ "matrix": [3,8], "x": 123, "y": 48, "flags": 4},
{ "matrix": [3,9], "x": 138, "y": 48, "flags": 4},
{ "matrix": [3,10], "x": 153, "y": 48, "flags": 4},
{ "matrix": [3,11], "x": 167, "y": 48, "flags": 4},
{ "matrix": [3,12], "x": 188, "y": 48, "flags": 4},
{ "matrix": [3,13], "x": 209, "y": 48, "flags": 4},
{ "matrix": [3,14], "x": 224, "y": 48, "flags": 4},
{ "matrix": [4,0], "x": 1, "y": 64, "flags": 4},
{ "matrix": [4,1], "x": 20, "y": 64, "flags": 4},
{ "matrix": [4,2], "x": 39, "y": 64, "flags": 4},
{ "matrix": [4,6], "x": 95, "y": 64, "flags": 4},
{ "matrix": [4,9], "x": 149, "y": 64, "flags": 4},
{ "matrix": [4,10], "x": 164, "y": 64, "flags": 4},
{ "matrix": [4,11], "x": 179, "y": 64, "flags": 4},
{ "matrix": [4,12], "x": 194, "y": 64, "flags": 4},
{ "matrix": [4,13], "x": 209, "y": 64, "flags": 4},
{ "matrix": [4,14], "x": 224, "y": 64, "flags": 4}
]
},
"layouts": {
"LAYOUT": {
Expand Down

0 comments on commit 4373488

Please sign in to comment.