Skip to content

Commit

Permalink
bastardkb/charybdis: add fake LEDs to the configuration
Browse files Browse the repository at this point in the history
For the Charybdis 3x5 (respectively 4x6), the LED config now simulates
36 (respectively 58) LEDs instead of the actual 35 (respectively 56) to
prevent confusion when testing LEDs during assembly when handedness is
not set correctly.  Those fake LEDs are bound to the physical
bottom-left corner.
  • Loading branch information
0xcharly committed Jul 5, 2022
1 parent ac01d74 commit ff5102e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
8 changes: 6 additions & 2 deletions keyboards/bastardkb/charybdis/3x5/3x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
* ╰────────────────────╯ ╰────────────────────╯
* 15 16 17 33 34 XX
* ╰────────────╯ ╰────────────╯
*
* Note: the LED config simulates 36 LEDs instead of the actual 35 to prevent
* confusion when testing LEDs during assembly when handedness is not set
* correctly. Those fake LEDs are bound to the physical bottom-left corner.
*/
led_config_t g_led_config = { {
/* Key Matrix to LED index. */
Expand Down Expand Up @@ -61,7 +65,7 @@ led_config_t g_led_config = { {
/* index=24 */ { 188, 42 }, { 188, 21 }, { 188, 0 },
/* index=27 */ { 170, 0 }, { 170, 21 }, { 170, 42 },
/* index=30 */ { 152, 0 }, { 152, 21 }, { 152, 42 },
/* index=33 */ { 152, 64 }, { 134, 64 },
/* index=33 */ { 134, 64 }, { 152, 64 }, { 0, 0 },
}, {
/* LED index to flag. */
// Left split.
Expand All @@ -77,7 +81,7 @@ led_config_t g_led_config = { {
/* index=24 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=27 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=30 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
/* index=33 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
} };
#endif
// clang-format on
4 changes: 2 additions & 2 deletions keyboards/bastardkb/charybdis/3x5/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#define ROTATIONAL_TRANSFORM_ANGLE -25

/* RGB settings. */
#define RGBLED_NUM 35
#define RGBLED_NUM 36
#define RGBLED_SPLIT \
{ 18, 17 }
{ 18, 18 }

/* RGB matrix support. */
#ifdef RGB_MATRIX_ENABLE
Expand Down
6 changes: 6 additions & 0 deletions keyboards/bastardkb/charybdis/4x6/4x6.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* 26 27 28 53 54 XX
* 25 24 55 XX
* ╰────────────╯ ╰────────────╯
*
* Note: the LED config simulates 58 LEDs instead of the actual 56 to prevent
* confusion when testing LEDs during assembly when handedness is not set
* correctly. Those fake LEDs are bound to the physical bottom-left corner.
*/
led_config_t g_led_config = { {
/* Key Matrix to LED index. */
Expand Down Expand Up @@ -70,6 +74,7 @@ led_config_t g_led_config = { {
/* index=45 */ { 160, 0 }, { 160, 12 }, { 160, 24 }, { 160, 36 },
/* index=49 */ { 144, 0 }, { 144, 12 }, { 144, 24 }, { 144, 36 },
/* index=53 */ { 112, 52 }, { 128, 64 }, { 112, 64 },
/* index=56 */ { 0, 0 }, { 0, 0 },
}, {
/* LED index to flag. */
// Left split.
Expand All @@ -89,6 +94,7 @@ led_config_t g_led_config = { {
/* index=45 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=49 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT,
/* index=53 */ LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, // Thumb cluster
/* index=55 */ LED_FLAG_MODIFIER, LED_FLAG_MODIFIER, // Thumb cluster fakes
} };
#endif
// clang-format on
4 changes: 2 additions & 2 deletions keyboards/bastardkb/charybdis/4x6/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
#define ROTATIONAL_TRANSFORM_ANGLE -25

/* RGB settings. */
#define RGBLED_NUM 56
#define RGBLED_NUM 58
#define RGBLED_SPLIT \
{ 29, 27 }
{ 29, 29 }

/* RGB matrix support. */
#ifdef RGB_MATRIX_ENABLE
Expand Down

0 comments on commit ff5102e

Please sign in to comment.