From e3ef5b2d9d3e9d97f86b0da42d1a2e2bd2ae194b Mon Sep 17 00:00:00 2001 From: tarxvf Date: Thu, 11 Jul 2024 08:46:54 -0400 Subject: [PATCH 01/15] mntre_v3: fix matrix bottom row (#24077) --- keyboards/mntre_v3/keyboard.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/mntre_v3/keyboard.json b/keyboards/mntre_v3/keyboard.json index d9cee6aede85..e00fe1deb282 100644 --- a/keyboards/mntre_v3/keyboard.json +++ b/keyboards/mntre_v3/keyboard.json @@ -108,12 +108,12 @@ {"matrix": [5, 2], "x": 2.75, "y": 5, "w": 1.5}, {"matrix": [5, 3], "x": 4.25, "y": 5, "w": 1.5}, {"matrix": [5, 4], "x": 5.75, "y": 5,"w": 2}, - {"matrix": [5, 5], "x": 7.75, "y": 5,"w": 1.5}, - {"matrix": [5, 6], "x": 9.25, "y": 5}, - {"matrix": [5, 7], "x": 10.25, "y": 5}, - {"matrix": [5, 8], "x": 11.25, "y": 5}, - {"matrix": [5, 9], "x": 12.25, "y": 5}, - {"matrix": [5, 10], "x": 13.25, "y": 5,"w": 1.25} + {"matrix": [5, 6], "x": 7.75, "y": 5,"w": 1.5}, + {"matrix": [5, 7], "x": 9.25, "y": 5}, + {"matrix": [5, 8], "x": 10.25, "y": 5}, + {"matrix": [5, 9], "x": 11.25, "y": 5}, + {"matrix": [5, 10], "x": 12.25, "y": 5}, + {"matrix": [5, 11], "x": 13.25, "y": 5,"w": 1.25} ] } } From 3d10171e2ced2923568d197a5a5f53d8d9355243 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jul 2024 22:49:45 +1000 Subject: [PATCH 02/15] `mt/mt84`: move RGB Matrix config to data driven (#24090) --- keyboards/mt/mt84/config.h | 2 - keyboards/mt/mt84/keyboard.json | 91 +++++++++++++++++++++++++++++++++ keyboards/mt/mt84/mt84.c | 23 --------- 3 files changed, 91 insertions(+), 25 deletions(-) diff --git a/keyboards/mt/mt84/config.h b/keyboards/mt/mt84/config.h index 9b115d527d5d..e2b30400a93e 100644 --- a/keyboards/mt/mt84/config.h +++ b/keyboards/mt/mt84/config.h @@ -18,8 +18,6 @@ #define IS31FL3737_I2C_ADDRESS_1 IS31FL3737_I2C_ADDRESS_GND #define IS31FL3737_I2C_ADDRESS_2 IS31FL3737_I2C_ADDRESS_VCC -#define RGB_MATRIX_LED_COUNT 84 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ diff --git a/keyboards/mt/mt84/keyboard.json b/keyboards/mt/mt84/keyboard.json index 8833f77ed98f..fd03c2cf71fd 100644 --- a/keyboards/mt/mt84/keyboard.json +++ b/keyboards/mt/mt84/keyboard.json @@ -57,6 +57,97 @@ "animation": "cycle_all" }, "driver": "is31fl3737", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 1}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 134, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 149, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 164, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 179, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 194, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 209, "y": 0, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 0, "y": 13, "flags": 1}, + {"matrix": [1, 1], "x": 15, "y": 13, "flags": 4}, + {"matrix": [1, 2], "x": 30, "y": 13, "flags": 4}, + {"matrix": [1, 3], "x": 45, "y": 13, "flags": 4}, + {"matrix": [1, 4], "x": 60, "y": 13, "flags": 4}, + {"matrix": [1, 5], "x": 75, "y": 13, "flags": 4}, + {"matrix": [1, 6], "x": 90, "y": 13, "flags": 4}, + {"matrix": [1, 7], "x": 105, "y": 13, "flags": 4}, + {"matrix": [1, 8], "x": 119, "y": 13, "flags": 4}, + {"matrix": [1, 9], "x": 134, "y": 13, "flags": 4}, + {"matrix": [1, 10], "x": 149, "y": 13, "flags": 4}, + {"matrix": [1, 11], "x": 164, "y": 13, "flags": 4}, + {"matrix": [1, 12], "x": 179, "y": 13, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 13, "flags": 4}, + {"matrix": [1, 14], "x": 224, "y": 13, "flags": 1}, + + {"matrix": [2, 0], "x": 4, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 22, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 37, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 52, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 67, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 82, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 97, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 112, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 142, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 157, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 172, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 187, "y": 26, "flags": 4}, + {"matrix": [2, 13], "x": 205, "y": 26, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 26, "flags": 1}, + + {"matrix": [3, 0], "x": 6, "y": 38, "flags": 1}, + {"matrix": [3, 1], "x": 26, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 41, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 56, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 71, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 86, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 101, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 116, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 131, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 146, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 161, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 175, "y": 38, "flags": 4}, + {"matrix": [3, 12], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 38, "flags": 1}, + + {"matrix": [4, 0], "x": 9, "y": 51, "flags": 1}, + {"matrix": [4, 1], "x": 34, "y": 51, "flags": 4}, + {"matrix": [4, 2], "x": 49, "y": 51, "flags": 4}, + {"matrix": [4, 3], "x": 63, "y": 51, "flags": 4}, + {"matrix": [4, 4], "x": 78, "y": 51, "flags": 4}, + {"matrix": [4, 5], "x": 93, "y": 51, "flags": 4}, + {"matrix": [4, 6], "x": 108, "y": 51, "flags": 4}, + {"matrix": [4, 7], "x": 123, "y": 51, "flags": 4}, + {"matrix": [4, 8], "x": 138, "y": 51, "flags": 4}, + {"matrix": [4, 9], "x": 153, "y": 51, "flags": 4}, + {"matrix": [4, 10], "x": 168, "y": 51, "flags": 4}, + {"matrix": [4, 11], "x": 189, "y": 51, "flags": 4}, + {"matrix": [4, 12], "x": 209, "y": 51, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 51, "flags": 1}, + + {"matrix": [5, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [5, 1], "x": 21, "y": 64, "flags": 1}, + {"matrix": [5, 2], "x": 39, "y": 64, "flags": 1}, + {"matrix": [5, 5], "x": 95, "y": 64, "flags": 4}, + {"matrix": [5, 9], "x": 149, "y": 64, "flags": 1}, + {"matrix": [5, 10], "x": 164, "y": 64, "flags": 1}, + {"matrix": [5, 11], "x": 179, "y": 64, "flags": 1}, + {"matrix": [5, 12], "x": 194, "y": 64, "flags": 4}, + {"matrix": [5, 13], "x": 209, "y": 64, "flags": 4}, + {"matrix": [5, 14], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 20, "max_brightness": 200 diff --git a/keyboards/mt/mt84/mt84.c b/keyboards/mt/mt84/mt84.c index 276c92fc065b..1ac61e87c02d 100644 --- a/keyboards/mt/mt84/mt84.c +++ b/keyboards/mt/mt84/mt84.c @@ -114,27 +114,4 @@ const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = { {1, SW4_CS10, SW5_CS10, SW6_CS10}, {1, SW7_CS10, SW8_CS10, SW9_CS10} }; - -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, 42, 43, 44 }, - { 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, - { 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73 }, - {74, 75, 76, 77, 78, 79, 80, 81, 82, 83 } -}, { - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 195, 0 }, { 210, 0 }, { 224, 0 }, - { 0, 13 }, { 15, 13 }, { 30, 13 }, { 45, 13 }, { 60, 13 }, { 75, 13 }, { 90, 13 }, { 105, 13 }, { 120, 13 }, { 135, 13 }, { 150, 13 }, { 165, 13 }, { 180, 13 }, { 205, 13 }, { 224, 13 }, - { 3, 26 }, { 18, 26 }, { 33, 26 }, { 48, 26 }, { 63, 26 }, { 78, 26 }, { 93, 26 }, { 108, 26 }, { 123, 26 }, { 138, 26 }, { 153, 26 }, { 168, 26 }, { 183, 26 }, { 205, 26 },{ 224, 26 }, - { 6, 39 }, { 20, 39 }, { 36, 39 }, { 52, 39 }, { 68, 39 }, { 84, 39 }, { 100, 39 }, { 116, 39 }, { 132, 39 }, { 148, 39 }, { 164, 39 }, { 180, 39 }, { 212, 39 }, { 224, 39 }, - { 9, 52 }, { 27, 52 }, { 43, 52 }, { 59, 52 }, { 75, 52 }, { 91, 52 }, { 107, 52 }, { 123, 52 }, { 139, 52 }, { 155, 52 }, { 171, 52 }, { 187, 52 }, { 212, 52 }, { 224, 52 }, -{ 2, 64 }, { 18, 64 }, { 33, 64 }, { 93, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } -}, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 4, 4, 4, -}}; #endif From 9be6d76c61f5b760e7ceaf03fe80da3f07a29d8a Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 11 Jul 2024 22:50:26 +1000 Subject: [PATCH 03/15] `mt/mt64rgb`: move RGB Matrix config to data driven (#24089) --- keyboards/mt/mt64rgb/config.h | 2 - keyboards/mt/mt64rgb/keyboard.json | 70 +++++++++++++++++++ keyboards/mt/mt64rgb/keymaps/default/keymap.c | 3 - keyboards/mt/mt64rgb/keymaps/via/keymap.c | 3 - keyboards/mt/mt64rgb/mt64rgb.c | 20 ------ 5 files changed, 70 insertions(+), 28 deletions(-) diff --git a/keyboards/mt/mt64rgb/config.h b/keyboards/mt/mt64rgb/config.h index f69c778b8b64..ad034ceec8d2 100644 --- a/keyboards/mt/mt64rgb/config.h +++ b/keyboards/mt/mt64rgb/config.h @@ -16,5 +16,3 @@ #pragma once #define IS31FL3733_I2C_ADDRESS_1 IS31FL3733_I2C_ADDRESS_GND_GND - -#define RGB_MATRIX_LED_COUNT 64 diff --git a/keyboards/mt/mt64rgb/keyboard.json b/keyboards/mt/mt64rgb/keyboard.json index 0858e85ecaef..451be59f8f5d 100644 --- a/keyboards/mt/mt64rgb/keyboard.json +++ b/keyboards/mt/mt64rgb/keyboard.json @@ -60,6 +60,76 @@ "solid_multisplash": true }, "driver": "is31fl3733", + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 16, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 32, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 48, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 64, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 80, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 96, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 112, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 128, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 144, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 160, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 192, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 216, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 1], "x": 24, "y": 16, "flags": 4}, + {"matrix": [1, 2], "x": 40, "y": 16, "flags": 4}, + {"matrix": [1, 3], "x": 56, "y": 16, "flags": 4}, + {"matrix": [1, 4], "x": 72, "y": 16, "flags": 4}, + {"matrix": [1, 5], "x": 88, "y": 16, "flags": 4}, + {"matrix": [1, 6], "x": 104, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 120, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 136, "y": 16, "flags": 4}, + {"matrix": [1, 9], "x": 152, "y": 16, "flags": 4}, + {"matrix": [1, 10], "x": 168, "y": 16, "flags": 4}, + {"matrix": [1, 11], "x": 184, "y": 16, "flags": 4}, + {"matrix": [1, 12], "x": 200, "y": 16, "flags": 4}, + {"matrix": [1, 13], "x": 220, "y": 16, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 32, "flags": 1}, + {"matrix": [2, 1], "x": 28, "y": 32, "flags": 4}, + {"matrix": [2, 2], "x": 44, "y": 32, "flags": 4}, + {"matrix": [2, 3], "x": 60, "y": 32, "flags": 4}, + {"matrix": [2, 4], "x": 76, "y": 32, "flags": 4}, + {"matrix": [2, 5], "x": 92, "y": 32, "flags": 4}, + {"matrix": [2, 6], "x": 108, "y": 32, "flags": 4}, + {"matrix": [2, 7], "x": 124, "y": 32, "flags": 4}, + {"matrix": [2, 8], "x": 140, "y": 32, "flags": 4}, + {"matrix": [2, 9], "x": 156, "y": 32, "flags": 4}, + {"matrix": [2, 10], "x": 172, "y": 32, "flags": 4}, + {"matrix": [2, 11], "x": 188, "y": 32, "flags": 4}, + {"matrix": [2, 12], "x": 214, "y": 32, "flags": 1}, + + {"matrix": [3, 0], "x": 8, "y": 48, "flags": 1}, + {"matrix": [3, 1], "x": 32, "y": 48, "flags": 4}, + {"matrix": [3, 2], "x": 48, "y": 48, "flags": 4}, + {"matrix": [3, 3], "x": 64, "y": 48, "flags": 4}, + {"matrix": [3, 4], "x": 80, "y": 48, "flags": 4}, + {"matrix": [3, 5], "x": 96, "y": 48, "flags": 4}, + {"matrix": [3, 6], "x": 112, "y": 48, "flags": 4}, + {"matrix": [3, 7], "x": 128, "y": 48, "flags": 4}, + {"matrix": [3, 8], "x": 144, "y": 48, "flags": 4}, + {"matrix": [3, 9], "x": 160, "y": 48, "flags": 4}, + {"matrix": [3, 10], "x": 176, "y": 48, "flags": 4}, + {"matrix": [3, 11], "x": 192, "y": 48, "flags": 4}, + {"matrix": [3, 12], "x": 208, "y": 48, "flags": 4}, + {"matrix": [3, 13], "x": 224, "y": 48, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 64, "flags": 1}, + {"matrix": [4, 1], "x": 22, "y": 64, "flags": 1}, + {"matrix": [4, 2], "x": 42, "y": 64, "flags": 1}, + {"matrix": [4, 5], "x": 102, "y": 64, "flags": 4}, + {"matrix": [4, 9], "x": 160, "y": 64, "flags": 1}, + {"matrix": [4, 10], "x": 176, "y": 64, "flags": 1}, + {"matrix": [4, 11], "x": 192, "y": 64, "flags": 4}, + {"matrix": [4, 12], "x": 208, "y": 64, "flags": 4}, + {"matrix": [4, 13], "x": 224, "y": 64, "flags": 4} + ], "led_flush_limit": 26, "led_process_limit": 20, "max_brightness": 160 diff --git a/keyboards/mt/mt64rgb/keymaps/default/keymap.c b/keyboards/mt/mt64rgb/keymaps/default/keymap.c index 7cff3be34c81..6c0d1a83fd7a 100644 --- a/keyboards/mt/mt64rgb/keymaps/default/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/default/keymap.c @@ -37,9 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool rgb_matrix_indicators_user(void) { - if (layer_state_is(1)) { - rgb_matrix_set_color(77,0xFF, 0x80, 0x00); - } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } diff --git a/keyboards/mt/mt64rgb/keymaps/via/keymap.c b/keyboards/mt/mt64rgb/keymaps/via/keymap.c index df4884a3a35d..7340b89ebbb6 100644 --- a/keyboards/mt/mt64rgb/keymaps/via/keymap.c +++ b/keyboards/mt/mt64rgb/keymaps/via/keymap.c @@ -34,9 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; bool rgb_matrix_indicators_user(void) { - if (layer_state_is(1)) { - rgb_matrix_set_color(77,0xFF, 0x80, 0x00); - } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(28, 0xFF, 0xFF, 0xFF); } diff --git a/keyboards/mt/mt64rgb/mt64rgb.c b/keyboards/mt/mt64rgb/mt64rgb.c index bcf26de23132..d08d87de46df 100644 --- a/keyboards/mt/mt64rgb/mt64rgb.c +++ b/keyboards/mt/mt64rgb/mt64rgb.c @@ -93,24 +93,4 @@ const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = { {0, SW10_CS10, SW11_CS10, SW12_CS10}, {0, SW10_CS15, SW11_CS15, SW12_CS15} }; - -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, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, - { 55, 56, 57, 58, 59, 60, 61, 62, 63} -}, { - { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, - { 4, 16 }, { 18, 16 }, { 34, 16 }, { 50, 16 }, { 66, 16 }, { 82, 16 }, { 98, 16 }, { 114, 16 }, { 130, 16 }, { 146, 16 }, { 162, 16 }, { 178, 16 }, { 194, 16 }, { 220, 16 }, - { 6, 32 }, { 20, 32 }, { 36, 32 }, { 52, 32 }, { 68, 32 }, { 84, 32 }, { 100, 32 }, { 116, 32 }, { 132, 32 }, { 148, 32 }, { 164, 32 }, { 180, 32 }, { 212, 32 }, - { 9, 48 }, { 27, 48 }, { 43, 48 }, { 59, 48 }, { 75, 48 }, { 91, 48 }, { 107, 48 }, { 123, 48 }, { 139, 48 }, { 155, 48 }, { 171, 48 }, { 187, 48 }, { 203, 48 }, { 219, 48 }, - { 2, 64 }, { 16, 64 }, { 32, 64 }, { 64, 64 }, { 114, 64 }, { 130, 64 }, { 146, 64 }, { 204, 64 }, { 224, 64 } -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 4, 4, 4, -}}; #endif From 0c4fd514f1146224c8407591a5e42a0db456b536 Mon Sep 17 00:00:00 2001 From: 4pplet Date: Thu, 11 Jul 2024 14:51:43 +0200 Subject: [PATCH 04/15] Adding support for IBE60 (#24075) --- keyboards/4pplet/ibe60/keyboard.json | 94 +++++++++++++++++++ .../4pplet/ibe60/keymaps/default/keymap.c | 34 +++++++ keyboards/4pplet/ibe60/keymaps/via/keymap.c | 35 +++++++ keyboards/4pplet/ibe60/keymaps/via/rules.mk | 1 + keyboards/4pplet/ibe60/readme.md | 24 +++++ keyboards/4pplet/ibe60/rules.mk | 2 + 6 files changed, 190 insertions(+) create mode 100644 keyboards/4pplet/ibe60/keyboard.json create mode 100644 keyboards/4pplet/ibe60/keymaps/default/keymap.c create mode 100644 keyboards/4pplet/ibe60/keymaps/via/keymap.c create mode 100644 keyboards/4pplet/ibe60/keymaps/via/rules.mk create mode 100644 keyboards/4pplet/ibe60/readme.md create mode 100644 keyboards/4pplet/ibe60/rules.mk diff --git a/keyboards/4pplet/ibe60/keyboard.json b/keyboards/4pplet/ibe60/keyboard.json new file mode 100644 index 000000000000..dd674c6ab98a --- /dev/null +++ b/keyboards/4pplet/ibe60/keyboard.json @@ -0,0 +1,94 @@ +{ + "manufacturer": "4pplet", + "keyboard_name": "IBE60 Rev A", + "maintainer": "4pplet", + "bootloader": "stm32-dfu", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "key_lock": true, + "mousekey": true, + "nkro": true + }, + "matrix_pins": { + "cols": ["B2", "A5", "A4", "A3", "F1", "F0", "C15", "C14", "C13", "B9", "B8", "B7", "A15", "B3"], + "rows": ["B14", "A9", "B6", "B5", "B4"] + }, + "processor": "STM32F072", + "usb": { + "device_version": "0.0.1", + "pid": "0x0001", + "vid": "0x4448" + }, + "indicators": { + "caps_lock": "A8" + }, + "community_layouts": ["60_hhkb"], + "layouts": { + "LAYOUT_60_hhkb": { + "layout": [ + {"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "!", "matrix": [0, 1], "x": 1, "y": 0}, + {"label": "@", "matrix": [0, 2], "x": 2, "y": 0}, + {"label": "#", "matrix": [0, 3], "x": 3, "y": 0}, + {"label": "$", "matrix": [0, 4], "x": 4, "y": 0}, + {"label": "%", "matrix": [0, 5], "x": 5, "y": 0}, + {"label": "^", "matrix": [0, 6], "x": 6, "y": 0}, + {"label": "&", "matrix": [0, 7], "x": 7, "y": 0}, + {"label": "*", "matrix": [0, 8], "x": 8, "y": 0}, + {"label": "(", "matrix": [0, 9], "x": 9, "y": 0}, + {"label": ")", "matrix": [0, 10], "x": 10, "y": 0}, + {"label": "_", "matrix": [0, 11], "x": 11, "y": 0}, + {"label": "+", "matrix": [0, 12], "x": 12, "y": 0}, + {"label": "|", "matrix": [0, 13], "x": 13, "y": 0}, + {"label": "~", "matrix": [2, 13], "x": 14, "y": 0}, + {"label": "Tab", "matrix": [1, 0], "x": 0, "y": 1, "w": 1.5}, + {"label": "Q", "matrix": [1, 1], "x": 1.5, "y": 1}, + {"label": "W", "matrix": [1, 2], "x": 2.5, "y": 1}, + {"label": "E", "matrix": [1, 3], "x": 3.5, "y": 1}, + {"label": "R", "matrix": [1, 4], "x": 4.5, "y": 1}, + {"label": "T", "matrix": [1, 5], "x": 5.5, "y": 1}, + {"label": "Y", "matrix": [1, 6], "x": 6.5, "y": 1}, + {"label": "U", "matrix": [1, 7], "x": 7.5, "y": 1}, + {"label": "I", "matrix": [1, 8], "x": 8.5, "y": 1}, + {"label": "O", "matrix": [1, 9], "x": 9.5, "y": 1}, + {"label": "P", "matrix": [1, 10], "x": 10.5, "y": 1}, + {"label": "{", "matrix": [1, 11], "x": 11.5, "y": 1}, + {"label": "}", "matrix": [1, 12], "x": 12.5, "y": 1}, + {"label": "|", "matrix": [1, 13], "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "matrix": [2, 0], "x": 0, "y": 2, "w": 1.75}, + {"label": "A", "matrix": [2, 1], "x": 1.75, "y": 2}, + {"label": "S", "matrix": [2, 2], "x": 2.75, "y": 2}, + {"label": "D", "matrix": [2, 3], "x": 3.75, "y": 2}, + {"label": "F", "matrix": [2, 4], "x": 4.75, "y": 2}, + {"label": "G", "matrix": [2, 5], "x": 5.75, "y": 2}, + {"label": "H", "matrix": [2, 6], "x": 6.75, "y": 2}, + {"label": "J", "matrix": [2, 7], "x": 7.75, "y": 2}, + {"label": "K", "matrix": [2, 8], "x": 8.75, "y": 2}, + {"label": "L", "matrix": [2, 9], "x": 9.75, "y": 2}, + {"label": ":", "matrix": [2, 10], "x": 10.75, "y": 2}, + {"label": "\"", "matrix": [2, 11], "x": 11.75, "y": 2}, + {"label": "Enter", "matrix": [3, 13], "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Shift", "matrix": [3, 0], "x": 0, "y": 3, "w": 2.25}, + {"label": "Z", "matrix": [3, 2], "x": 2.25, "y": 3}, + {"label": "X", "matrix": [3, 3], "x": 3.25, "y": 3}, + {"label": "C", "matrix": [3, 4], "x": 4.25, "y": 3}, + {"label": "V", "matrix": [3, 5], "x": 5.25, "y": 3}, + {"label": "B", "matrix": [3, 6], "x": 6.25, "y": 3}, + {"label": "N", "matrix": [3, 7], "x": 7.25, "y": 3}, + {"label": "M", "matrix": [3, 8], "x": 8.25, "y": 3}, + {"label": "<", "matrix": [3, 9], "x": 9.25, "y": 3}, + {"label": ">", "matrix": [3, 10], "x": 10.25, "y": 3}, + {"label": "?", "matrix": [3, 11], "x": 11.25, "y": 3}, + {"label": "Shift", "matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75}, + {"label": "Fn", "matrix": [4, 13], "x": 14, "y": 3}, + {"label": "Win", "matrix": [4, 1], "x": 1.5, "y": 4}, + {"label": "Alt", "matrix": [4, 2], "x": 2.5, "y": 4, "w": 1.5}, + {"label": "Space", "matrix": [4, 6], "x": 4, "y": 4, "w": 7}, + {"label": "Alt", "matrix": [4, 9], "x": 11, "y": 4, "w": 1.5}, + {"label": "Win", "matrix": [4, 10], "x": 12.5, "y": 4} + ] + } + } +} diff --git a/keyboards/4pplet/ibe60/keymaps/default/keymap.c b/keyboards/4pplet/ibe60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9ec56d480996 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_60_hhkb( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), +// basic function layer +[1] = LAYOUT_60_hhkb( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; \ No newline at end of file diff --git a/keyboards/4pplet/ibe60/keymaps/via/keymap.c b/keyboards/4pplet/ibe60/keymaps/via/keymap.c new file mode 100644 index 000000000000..710b5ce84978 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/via/keymap.c @@ -0,0 +1,35 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_60_hhkb( + KC_ESC, 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_BSLS, KC_GRV, + 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_BSPC, + 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, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI), +// basic function layer +[1] = LAYOUT_60_hhkb( + QK_BOOT, 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + diff --git a/keyboards/4pplet/ibe60/keymaps/via/rules.mk b/keyboards/4pplet/ibe60/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/4pplet/ibe60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/4pplet/ibe60/readme.md b/keyboards/4pplet/ibe60/readme.md new file mode 100644 index 000000000000..24ed159952df --- /dev/null +++ b/keyboards/4pplet/ibe60/readme.md @@ -0,0 +1,24 @@ +# IBE60 + +PCB mounted 60% PCB for the IBE60 in fixed true HHKB layout + +* Keyboard Maintainer: [Stefan Sundin](https://github.com/4pplet) +* Hardware Supported: IBE60 Solder PCB + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/ibe60:default + +Flashing example for this keyboard: + + make 4pplet/ibe60:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the Escape key and plug in the keyboard +* **Physical reset button**: Short the reset-header (labled BL/RESET) on the back of the PCB for about 2 seconds for the keyboard to enter bootloader +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available diff --git a/keyboards/4pplet/ibe60/rules.mk b/keyboards/4pplet/ibe60/rules.mk new file mode 100644 index 000000000000..04fe1eba2acd --- /dev/null +++ b/keyboards/4pplet/ibe60/rules.mk @@ -0,0 +1,2 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF From cc62eb503d8e0b1cb1be869597a5a972ebbca5f6 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 11 Jul 2024 07:39:45 -0600 Subject: [PATCH 05/15] [Keyboard] Add boardsource/sessenta (#23823) --- keyboards/boardsource/sessanta/keyboard.json | 255 ++++++++++++++++++ .../sessanta/keymaps/default/keymap.json | 21 ++ .../sessanta/keymaps/via/keymap.json | 26 ++ keyboards/boardsource/sessanta/readme.md | 27 ++ 4 files changed, 329 insertions(+) create mode 100644 keyboards/boardsource/sessanta/keyboard.json create mode 100644 keyboards/boardsource/sessanta/keymaps/default/keymap.json create mode 100644 keyboards/boardsource/sessanta/keymaps/via/keymap.json create mode 100644 keyboards/boardsource/sessanta/readme.md diff --git a/keyboards/boardsource/sessanta/keyboard.json b/keyboards/boardsource/sessanta/keyboard.json new file mode 100644 index 000000000000..c129e3acf595 --- /dev/null +++ b/keyboards/boardsource/sessanta/keyboard.json @@ -0,0 +1,255 @@ +{ + "manufacturer": "Boardsource", + "keyboard_name": "Sessanta", + "maintainer": "waffle87", + "development_board": "promicro", + "diode_direction": "COL2ROW", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgb_matrix": true + }, + "matrix_pins": { + "cols": ["F4", "F5", "F6", "F7", "B1", "B3", "B2", "B6", "D3"], + "rows": ["D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"] + }, + "rgb_matrix": { + "animations": { + "alphas_mods": true, + "band_sat": true, + "band_val": true, + "breathing": true, + "gradient_left_right": true + }, + "driver": "ws2812", + "layout": [ + {"x": 224, "y": 4, "flags": 2}, + {"x": 156, "y": 0, "flags": 2}, + {"x": 82, "y": 0, "flags": 2}, + {"x": 13, "y": 4, "flags": 2}, + {"x": 24, "y": 50, "flags": 2}, + {"x": 68, "y": 52, "flags": 2}, + {"x": 121, "y": 52, "flags": 2}, + {"x": 220, "y": 52, "flags": 2}, + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 30, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 45, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 60, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 75, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 90, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 105, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 119, "y": 0, "flags": 4}, + {"matrix": [1, 0], "x": 134, "y": 0, "flags": 4}, + {"matrix": [1, 1], "x": 149, "y": 0, "flags": 4}, + {"matrix": [1, 2], "x": 164, "y": 0, "flags": 4}, + {"matrix": [1, 3], "x": 179, "y": 0, "flags": 4}, + {"matrix": [1, 4], "x": 202, "y": 0, "flags": 1}, + {"matrix": [1, 5], "x": 4, "y": 16, "flags": 1}, + {"matrix": [1, 6], "x": 22, "y": 16, "flags": 4}, + {"matrix": [1, 7], "x": 37, "y": 16, "flags": 4}, + {"matrix": [1, 8], "x": 52, "y": 16, "flags": 4}, + {"matrix": [2, 0], "x": 67, "y": 16, "flags": 4}, + {"matrix": [2, 1], "x": 82, "y": 16, "flags": 4}, + {"matrix": [2, 2], "x": 97, "y": 16, "flags": 4}, + {"matrix": [2, 3], "x": 112, "y": 16, "flags": 4}, + {"matrix": [2, 4], "x": 127, "y": 16, "flags": 4}, + {"matrix": [2, 5], "x": 142, "y": 16, "flags": 4}, + {"matrix": [2, 6], "x": 157, "y": 16, "flags": 4}, + {"matrix": [2, 7], "x": 172, "y": 16, "flags": 4}, + {"matrix": [2, 8], "x": 187, "y": 16, "flags": 4}, + {"matrix": [3, 0], "x": 205, "y": 16, "flags": 1}, + {"matrix": [3, 1], "x": 6, "y": 32, "flags": 1}, + {"matrix": [3, 2], "x": 26, "y": 32, "flags": 4}, + {"matrix": [3, 3], "x": 41, "y": 32, "flags": 4}, + {"matrix": [3, 4], "x": 56, "y": 32, "flags": 4}, + {"matrix": [3, 5], "x": 71, "y": 32, "flags": 4}, + {"matrix": [3, 6], "x": 86, "y": 32, "flags": 4}, + {"matrix": [3, 7], "x": 101, "y": 32, "flags": 4}, + {"matrix": [3, 8], "x": 116, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 131, "y": 32, "flags": 4}, + {"matrix": [4, 1], "x": 146, "y": 32, "flags": 4}, + {"matrix": [4, 2], "x": 161, "y": 32, "flags": 4}, + {"matrix": [4, 3], "x": 175, "y": 32, "flags": 4}, + {"matrix": [4, 4], "x": 200, "y": 32, "flags": 1}, + {"matrix": [4, 5], "x": 224, "y": 32, "flags": 1}, + {"matrix": [4, 6], "x": 9, "y": 48, "flags": 1}, + {"matrix": [4, 7], "x": 34, "y": 48, "flags": 4}, + {"matrix": [4, 8], "x": 49, "y": 48, "flags": 4}, + {"matrix": [5, 0], "x": 63, "y": 48, "flags": 4}, + {"matrix": [5, 1], "x": 78, "y": 48, "flags": 4}, + {"matrix": [5, 2], "x": 93, "y": 48, "flags": 4}, + {"matrix": [5, 3], "x": 108, "y": 48, "flags": 4}, + {"matrix": [5, 4], "x": 123, "y": 48, "flags": 4}, + {"matrix": [5, 5], "x": 138, "y": 48, "flags": 4}, + {"matrix": [5, 6], "x": 153, "y": 48, "flags": 4}, + {"matrix": [5, 7], "x": 168, "y": 48, "flags": 4}, + {"matrix": [5, 8], "x": 196, "y": 48, "flags": 1}, + {"matrix": [6, 0], "x": 224, "y": 48, "flags": 1}, + {"matrix": [6, 1], "x": 2, "y": 64, "flags": 1}, + {"matrix": [6, 2], "x": 21, "y": 64, "flags": 1}, + {"matrix": [6, 3], "x": 39, "y": 64, "flags": 1}, + {"matrix": [6, 4], "x": 95, "y": 64, "flags": 4}, + {"matrix": [6, 5], "x": 151, "y": 64, "flags": 1}, + {"matrix": [6, 6], "x": 170, "y": 64, "flags": 1}, + {"matrix": [6, 7], "x": 189, "y": 64, "flags": 1}, + {"matrix": [6, 8], "x": 207, "y": 64, "flags": 1}, + {"matrix": [7, 0], "x": 224, "y": 64, "flags": 1} + ], + "max_brightness": 150, + "sleep": true + }, + "url": "https://boardsource.xyz", + "usb": { + "device_version": "1.0.0", + "pid": "0x17AC", + "vid": "0x4273" + }, + "ws2812": { + "pin": "D2" + }, + "layouts": { + "LAYOUT_625_bar": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [1, 0], "x": 9, "y": 0}, + {"matrix": [1, 1], "x": 10, "y": 0}, + {"matrix": [1, 2], "x": 11, "y": 0}, + {"matrix": [1, 3], "x": 12, "y": 0}, + {"matrix": [1, 4], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 5], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 6], "x": 1.5, "y": 1}, + {"matrix": [1, 7], "x": 2.5, "y": 1}, + {"matrix": [1, 8], "x": 3.5, "y": 1}, + {"matrix": [2, 0], "x": 4.5, "y": 1}, + {"matrix": [2, 1], "x": 5.5, "y": 1}, + {"matrix": [2, 2], "x": 6.5, "y": 1}, + {"matrix": [2, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [2, 5], "x": 9.5, "y": 1}, + {"matrix": [2, 6], "x": 10.5, "y": 1}, + {"matrix": [2, 7], "x": 11.5, "y": 1}, + {"matrix": [2, 8], "x": 12.5, "y": 1}, + {"matrix": [3, 0], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [3, 2], "x": 1.75, "y": 2}, + {"matrix": [3, 3], "x": 2.75, "y": 2}, + {"matrix": [3, 4], "x": 3.75, "y": 2}, + {"matrix": [3, 5], "x": 4.75, "y": 2}, + {"matrix": [3, 6], "x": 5.75, "y": 2}, + {"matrix": [3, 7], "x": 6.75, "y": 2}, + {"matrix": [3, 8], "x": 7.75, "y": 2}, + {"matrix": [4, 0], "x": 8.75, "y": 2}, + {"matrix": [4, 1], "x": 9.75, "y": 2}, + {"matrix": [4, 2], "x": 10.75, "y": 2}, + {"matrix": [4, 3], "x": 11.75, "y": 2}, + {"matrix": [4, 4], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [4, 5], "x": 15, "y": 2}, + {"matrix": [4, 6], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [4, 7], "x": 2.25, "y": 3}, + {"matrix": [4, 8], "x": 3.25, "y": 3}, + {"matrix": [5, 0], "x": 4.25, "y": 3}, + {"matrix": [5, 1], "x": 5.25, "y": 3}, + {"matrix": [5, 2], "x": 6.25, "y": 3}, + {"matrix": [5, 3], "x": 7.25, "y": 3}, + {"matrix": [5, 4], "x": 8.25, "y": 3}, + {"matrix": [5, 5], "x": 9.25, "y": 3}, + {"matrix": [5, 6], "x": 10.25, "y": 3}, + {"matrix": [5, 7], "x": 11.25, "y": 3}, + {"matrix": [5, 8], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [6, 0], "x": 15, "y": 3}, + {"matrix": [6, 1], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 2], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [6, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [6, 4], "x": 3.75, "y": 4, "w": 6.25}, + {"matrix": [6, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [6, 6], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [6, 7], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [6, 8], "x": 13.75, "y": 4, "w": 1.25}, + {"matrix": [7, 0], "x": 15, "y": 4} + ] + }, + "LAYOUT_all": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + {"matrix": [0, 4], "x": 4, "y": 0}, + {"matrix": [0, 5], "x": 5, "y": 0}, + {"matrix": [0, 6], "x": 6, "y": 0}, + {"matrix": [0, 7], "x": 7, "y": 0}, + {"matrix": [0, 8], "x": 8, "y": 0}, + {"matrix": [1, 0], "x": 9, "y": 0}, + {"matrix": [1, 1], "x": 10, "y": 0}, + {"matrix": [1, 2], "x": 11, "y": 0}, + {"matrix": [1, 3], "x": 12, "y": 0}, + {"matrix": [1, 4], "x": 13, "y": 0, "w": 2}, + {"matrix": [1, 5], "x": 0, "y": 1, "w": 1.5}, + {"matrix": [1, 6], "x": 1.5, "y": 1}, + {"matrix": [1, 7], "x": 2.5, "y": 1}, + {"matrix": [1, 8], "x": 3.5, "y": 1}, + {"matrix": [2, 0], "x": 4.5, "y": 1}, + {"matrix": [2, 1], "x": 5.5, "y": 1}, + {"matrix": [2, 2], "x": 6.5, "y": 1}, + {"matrix": [2, 3], "x": 7.5, "y": 1}, + {"matrix": [2, 4], "x": 8.5, "y": 1}, + {"matrix": [2, 5], "x": 9.5, "y": 1}, + {"matrix": [2, 6], "x": 10.5, "y": 1}, + {"matrix": [2, 7], "x": 11.5, "y": 1}, + {"matrix": [2, 8], "x": 12.5, "y": 1}, + {"matrix": [3, 0], "x": 13.5, "y": 1, "w": 1.5}, + {"matrix": [3, 1], "x": 0, "y": 2, "w": 1.75}, + {"matrix": [3, 2], "x": 1.75, "y": 2}, + {"matrix": [3, 3], "x": 2.75, "y": 2}, + {"matrix": [3, 4], "x": 3.75, "y": 2}, + {"matrix": [3, 5], "x": 4.75, "y": 2}, + {"matrix": [3, 6], "x": 5.75, "y": 2}, + {"matrix": [3, 7], "x": 6.75, "y": 2}, + {"matrix": [3, 8], "x": 7.75, "y": 2}, + {"matrix": [4, 0], "x": 8.75, "y": 2}, + {"matrix": [4, 1], "x": 9.75, "y": 2}, + {"matrix": [4, 2], "x": 10.75, "y": 2}, + {"matrix": [4, 3], "x": 11.75, "y": 2}, + {"matrix": [4, 4], "x": 12.75, "y": 2, "w": 2.25}, + {"matrix": [4, 5], "x": 15, "y": 2}, + {"matrix": [4, 6], "x": 0, "y": 3, "w": 2.25}, + {"matrix": [4, 7], "x": 2.25, "y": 3}, + {"matrix": [4, 8], "x": 3.25, "y": 3}, + {"matrix": [5, 0], "x": 4.25, "y": 3}, + {"matrix": [5, 1], "x": 5.25, "y": 3}, + {"matrix": [5, 2], "x": 6.25, "y": 3}, + {"matrix": [5, 3], "x": 7.25, "y": 3}, + {"matrix": [5, 4], "x": 8.25, "y": 3}, + {"matrix": [5, 5], "x": 9.25, "y": 3}, + {"matrix": [5, 6], "x": 10.25, "y": 3}, + {"matrix": [5, 7], "x": 11.25, "y": 3}, + {"matrix": [5, 8], "x": 12.25, "y": 3, "w": 2.75}, + {"matrix": [6, 0], "x": 15, "y": 3}, + {"matrix": [6, 1], "x": 0, "y": 4, "w": 1.25}, + {"matrix": [6, 2], "x": 1.25, "y": 4, "w": 1.25}, + {"matrix": [6, 3], "x": 2.5, "y": 4, "w": 1.25}, + {"matrix": [7, 1], "x": 3.75, "y": 4, "w": 1.5}, + {"matrix": [7, 2], "x": 5.25, "y": 4}, + {"matrix": [6, 4], "x": 6.25, "y": 4, "w": 1.25}, + {"matrix": [7, 3], "x": 7.5, "y": 4}, + {"matrix": [7, 4], "x": 8.5, "y": 4, "w": 1.5}, + {"matrix": [6, 5], "x": 10, "y": 4, "w": 1.25}, + {"matrix": [6, 6], "x": 11.25, "y": 4, "w": 1.25}, + {"matrix": [6, 7], "x": 12.5, "y": 4, "w": 1.25}, + {"matrix": [6, 8], "x": 13.75, "y": 4, "w": 1.25}, + {"matrix": [7, 0], "x": 15, "y": 4} + ] + } + } +} diff --git a/keyboards/boardsource/sessanta/keymaps/default/keymap.json b/keyboards/boardsource/sessanta/keymaps/default/keymap.json new file mode 100644 index 000000000000..b99333c46d77 --- /dev/null +++ b/keyboards/boardsource/sessanta/keymaps/default/keymap.json @@ -0,0 +1,21 @@ +{ + "keyboard": "boardsource/sessanta", + "keymap": "default", + "layout": "LAYOUT_625_bar", + "layers": [ + [ + "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_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_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", "KC_VOLU", + "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_MPLY", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_VOLD" + ], + [ + "QK_BOOT", "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_F13", + "QK_RBT", "RGB_MOD", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "EE_CLR", "RGB_RMOD", "RGB_VAD", "RGB_HUD", "RGB_SAD", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/sessanta/keymaps/via/keymap.json b/keyboards/boardsource/sessanta/keymaps/via/keymap.json new file mode 100644 index 000000000000..68e8e5fb2085 --- /dev/null +++ b/keyboards/boardsource/sessanta/keymaps/via/keymap.json @@ -0,0 +1,26 @@ +{ + "keyboard": "boardsource/sessanta", + "keymap": "via", + "layout": "LAYOUT_all", + "config": { + "features": { + "via": true + } + }, + "layers": [ + [ + "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_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_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", "KC_VOLU", + "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_MPLY", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "KC_SPC", "MO(1)", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_VOLD" + ], + [ + "QK_BOOT", "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_F13", + "QK_RBT", "RGB_MOD", "RGB_VAI", "RGB_HUI", "RGB_SAI", "RGB_TOG", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "EE_CLR", "RGB_RMOD", "RGB_VAD", "RGB_HUD", "RGB_SAD", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", + "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______", "_______" + ] + ] +} diff --git a/keyboards/boardsource/sessanta/readme.md b/keyboards/boardsource/sessanta/readme.md new file mode 100644 index 000000000000..35c841271c36 --- /dev/null +++ b/keyboards/boardsource/sessanta/readme.md @@ -0,0 +1,27 @@ +# Sessanta + +![image](https://i.imgur.com/ALvvC53.jpeg) + +A 60% keyboard offered in an MX or Choc PCB with per-key RGB + +* Keyboard Maintainer: [waffle87](https://github.com/waffle87) +* Hardware Supported: Sessanta PCB w/ Pro Micro compatible microcontroller +* Hardware Availability: [boardsource.xyz](https://boardsource.xyz) + +Make example for this keyboard (after setting up your build environment): + + make boardsource/sessanta:default + +Flashing example for this keyboard: + + make boardsource/sessanta:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB near microcontroller +* **Keycode in layout**: Press the key mapped to `QK_BOOT` From 1b8b6801d4f896409a765d302e7e0d50ff089692 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Thu, 11 Jul 2024 23:43:26 +1000 Subject: [PATCH 06/15] [CI] Add index page generator. (#23737) --- .github/workflows/ci_build_major_branch.yml | 24 +++- .gitignore | 1 + util/ci/index_generator.py | 109 +++++++++++++++ util/ci/requirements.txt | 2 + util/ci/templates/index.html.j2 | 139 ++++++++++++++++++++ 5 files changed, 269 insertions(+), 6 deletions(-) create mode 100755 util/ci/index_generator.py create mode 100644 util/ci/templates/index.html.j2 diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 77755ba71f41..0e772c7d5361 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -77,44 +77,56 @@ jobs: runs-on: ubuntu-latest steps: + - name: Disable safe.directory check + run: | + git config --global --add safe.directory '*' + + - name: Checkout QMK Firmware + uses: actions/checkout@v4 + - name: Download firmwares uses: actions/download-artifact@v4 with: pattern: firmware-* - path: firmwares + path: . merge-multiple: true + - name: Generate index page + run: | + python3 -m pip install -r ./util/ci/requirements.txt + ./util/ci/index_generator.py > index.html + - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }} uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} - SOURCE_DIR: firmwares + SOURCE_DIR: . DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }} - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }} AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }} AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }} - SOURCE_DIR: firmwares + SOURCE_DIR: . DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest - name: Check if failure marker file exists id: check_failure_marker uses: andstor/file-existence-action@v3 with: - files: firmwares/.failed + files: ./.failed - name: Fail build if needed if: steps.check_failure_marker.outputs.files_exists == 'true' diff --git a/.gitignore b/.gitignore index 35b128606d7d..5de38c161cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ *.la *.stackdump *.sym +index.html # QMK-specific api_data/v1 diff --git a/util/ci/index_generator.py b/util/ci/index_generator.py new file mode 100755 index 000000000000..b6440bbffb71 --- /dev/null +++ b/util/ci/index_generator.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 + +import os +import re +import shlex +import subprocess +from pathlib import Path + +from ansi2html import Ansi2HTMLConverter +from jinja2 import Environment, FileSystemLoader, select_autoescape + +orig_cwd = os.getcwd() +qmk_firmware_dir = Path(os.path.realpath(__file__)).parents[2] +build_dir = qmk_firmware_dir / ".build" + +KEYBOARD_PATTERN = re.compile("CI Metadata: KEYBOARD=(?P.*)\r?\n") +KEYMAP_PATTERN = re.compile("CI Metadata: KEYMAP=(?P.*)\r?\n") + +env = Environment( + loader=FileSystemLoader(Path(os.path.realpath(__file__)).parent / "templates"), + autoescape=select_autoescape(), +) + + +def _run(command, capture_output=True, combined_output=False, text=True, **kwargs): + if isinstance(command, str): + command = shlex.split(command) + if capture_output: + kwargs["stdout"] = subprocess.PIPE + kwargs["stderr"] = subprocess.PIPE + if combined_output: + kwargs["stderr"] = subprocess.STDOUT + if "stdin" in kwargs and kwargs["stdin"] is None: + del kwargs["stdin"] + if text: + kwargs["universal_newlines"] = True + return subprocess.run(command, **kwargs) + + +def _ansi2html(value): + return Ansi2HTMLConverter().convert(value, full=False) + + +def _ansi2html_styles(): + from ansi2html.style import get_styles + + styles = get_styles(scheme="dracula") + return "\n".join([str(s) for s in styles]) + + +def _git_log(count = 4): + os.chdir(qmk_firmware_dir) + ret = _run(f"git log -n {count} --color=always --no-merges --topo-order --stat").stdout.strip() + os.chdir(orig_cwd) + return ret + +def _git_describe(): + os.chdir(qmk_firmware_dir) + ret = _run("git describe --tags --always --dirty").stdout.strip() + os.chdir(orig_cwd) + return ret + +def _git_revision(): + os.chdir(qmk_firmware_dir) + ret = _run("git rev-parse HEAD").stdout.strip() + os.chdir(orig_cwd) + return ret + + +env.filters["ansi2html"] = _ansi2html + +binaries = [] +binaries.extend(qmk_firmware_dir.glob("*.bin")) +binaries.extend(qmk_firmware_dir.glob("*.hex")) +binaries.extend(qmk_firmware_dir.glob("*.uf2")) +binaries = list(sorted(binaries)) + +failures = [] +for mdfile in list(sorted(build_dir.glob("failed.log.*"))): + txt = Path(mdfile).read_text() + + m_kb = KEYBOARD_PATTERN.search(txt) + if not m_kb: + raise Exception("Couldn't determine the keyboard from the failure output") + m_km = KEYMAP_PATTERN.search(txt) + if not m_km: + raise Exception("Couldn't determine the keymap from the failure output") + + txt = KEYBOARD_PATTERN.sub("", KEYMAP_PATTERN.sub("", txt)).strip() + + failures.append( + { + "stdout": txt, + "keyboard": m_kb.group("keyboard"), + "keymap": m_km.group("keymap"), + } + ) + +template = env.get_template("index.html.j2") +print( + template.render( + ansi2html_styles=_ansi2html_styles(), + git_log=_git_log(), + git_describe=_git_describe(), + git_revision=_git_revision(), + binaries=binaries, + failures=failures, + ) +) diff --git a/util/ci/requirements.txt b/util/ci/requirements.txt index 3196568e1a7c..47acf85644f5 100644 --- a/util/ci/requirements.txt +++ b/util/ci/requirements.txt @@ -1 +1,3 @@ discord-webhook +Jinja2 +ansi2html diff --git a/util/ci/templates/index.html.j2 b/util/ci/templates/index.html.j2 new file mode 100644 index 000000000000..18086987db06 --- /dev/null +++ b/util/ci/templates/index.html.j2 @@ -0,0 +1,139 @@ + + + + + + + + + +
+
+
+ +
+
+
+ CI Build {% if failures | length > 0 %}❌{% else %}✅{% endif %} +
+
+ {{ git_describe }} +
+
+ {{ git_revision }} +
+
+ {{ failures | length }} failure{% if failures | length != 1 %}s{% endif %} +
+
+ + {% if binaries | length > 0 %}Firmwares | {% endif %} + Commit info + {% if failures | length > 0 %} | Failure Logs{% endif %} + +
+
+
+ +
+

Git commit

+
+
{{ git_log | ansi2html }}
+
+
+ {% if failures | length > 0 %} + +
+

Build failure logs

+ +
+ {% for failure in failures %} + +
+

Build failure — {{ failure.keyboard }}:{{ failure.keymap }}

+
+
{{ failure.stdout | ansi2html }}
+
+
+ {% endfor %} + {% endif %} +
+ {% if binaries | length > 0 %} +
+ +
+

Firmware downloads

+
+ {% for binary in binaries %} + + {%- endfor %} +
+
+
+ {% endif %} + + + From 2e671cfd8be1a867cb6717732f1045fc026aeba0 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Thu, 11 Jul 2024 23:50:39 +1000 Subject: [PATCH 07/15] [CI] Format code according to conventions (#24095) Format code according to conventions --- util/ci/index_generator.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/util/ci/index_generator.py b/util/ci/index_generator.py index b6440bbffb71..f2f7f4d41671 100755 --- a/util/ci/index_generator.py +++ b/util/ci/index_generator.py @@ -48,18 +48,20 @@ def _ansi2html_styles(): return "\n".join([str(s) for s in styles]) -def _git_log(count = 4): +def _git_log(count=4): os.chdir(qmk_firmware_dir) ret = _run(f"git log -n {count} --color=always --no-merges --topo-order --stat").stdout.strip() os.chdir(orig_cwd) return ret + def _git_describe(): os.chdir(qmk_firmware_dir) ret = _run("git describe --tags --always --dirty").stdout.strip() os.chdir(orig_cwd) return ret + def _git_revision(): os.chdir(qmk_firmware_dir) ret = _run("git rev-parse HEAD").stdout.strip() @@ -88,22 +90,18 @@ def _git_revision(): txt = KEYBOARD_PATTERN.sub("", KEYMAP_PATTERN.sub("", txt)).strip() - failures.append( - { - "stdout": txt, - "keyboard": m_kb.group("keyboard"), - "keymap": m_km.group("keymap"), - } - ) + failures.append({ + "stdout": txt, + "keyboard": m_kb.group("keyboard"), + "keymap": m_km.group("keymap"), + }) template = env.get_template("index.html.j2") -print( - template.render( - ansi2html_styles=_ansi2html_styles(), - git_log=_git_log(), - git_describe=_git_describe(), - git_revision=_git_revision(), - binaries=binaries, - failures=failures, - ) -) +print(template.render( + ansi2html_styles=_ansi2html_styles(), + git_log=_git_log(), + git_describe=_git_describe(), + git_revision=_git_revision(), + binaries=binaries, + failures=failures, +)) From 063f1444c68a64a02fe2f5c3de2f8fa765f53533 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 11 Jul 2024 23:48:43 +0100 Subject: [PATCH 08/15] Add json index of files to CI uploads (#24097) --- .github/workflows/ci_build_major_branch.yml | 5 ++-- .gitignore | 1 + util/ci/firmware_list_generator.py | 26 +++++++++++++++++++++ util/ci/templates/index.html.j2 | 3 ++- 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 util/ci/firmware_list_generator.py diff --git a/.github/workflows/ci_build_major_branch.yml b/.github/workflows/ci_build_major_branch.yml index 0e772c7d5361..ba5d1c246fe4 100644 --- a/.github/workflows/ci_build_major_branch.yml +++ b/.github/workflows/ci_build_major_branch.yml @@ -95,11 +95,12 @@ jobs: run: | python3 -m pip install -r ./util/ci/requirements.txt ./util/ci/index_generator.py > index.html + ./util/ci/firmware_list_generator.py > firmware_list.json - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }} uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} @@ -112,7 +113,7 @@ jobs: - name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest uses: jakejarvis/s3-sync-action@master with: - args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include '*.hex' --include '*.bin' --include '*.uf2' + args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2' env: AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }} AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }} diff --git a/.gitignore b/.gitignore index 5de38c161cdd..c3f2f063cd18 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ *.stackdump *.sym index.html +firmware_list.json # QMK-specific api_data/v1 diff --git a/util/ci/firmware_list_generator.py b/util/ci/firmware_list_generator.py new file mode 100644 index 000000000000..926939f4c3e5 --- /dev/null +++ b/util/ci/firmware_list_generator.py @@ -0,0 +1,26 @@ +import os +import json +from pathlib import Path +from time import gmtime, strftime + +DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S %Z' + +def current_datetime(): + return strftime(DATETIME_FORMAT, gmtime()) + + +qmk_firmware_dir = Path(os.path.realpath(__file__)).parents[2] + +binaries = [] +binaries.extend(qmk_firmware_dir.glob("*.bin")) +binaries.extend(qmk_firmware_dir.glob("*.hex")) +binaries.extend(qmk_firmware_dir.glob("*.uf2")) +binaries = list(sorted(binaries)) + +data = [] +for binary in binaries: + data.append(binary.name) + +keyboard_all_json = json.dumps({'last_updated': current_datetime(), 'files': data}, separators=(',', ':')) + +print(keyboard_all_json) diff --git a/util/ci/templates/index.html.j2 b/util/ci/templates/index.html.j2 index 18086987db06..1199a0819d38 100644 --- a/util/ci/templates/index.html.j2 +++ b/util/ci/templates/index.html.j2 @@ -3,6 +3,7 @@ +