Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup keychron/q5 #19119

Merged
merged 1 commit into from
Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/ansi/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#ifdef RGB_MATRIX_ENABLE

const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/ansi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 55
#define DRIVER_2_LED_TOTAL 45
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 54
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/ansi_encoder/ansi_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// clang-format off

const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/ansi_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 53
#define DRIVER_2_LED_TOTAL 45
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Encoder Configuration */
#define ENCODERS_PAD_A { C14 }
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/iso/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 55
#define DRIVER_2_LED_TOTAL 46
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 53
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/iso/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// clang-format off

const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/iso_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 53
#define DRIVER_2_LED_TOTAL 46
#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)

/* Encoder Configuration */
#define ENCODERS_PAD_A { C14 }
Expand Down
2 changes: 1 addition & 1 deletion keyboards/keychron/q5/iso_encoder/iso_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

// clang-format off

const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = {
const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
/* Refer to IS31 manual for these locations
* driver
* | R location
Expand Down
4 changes: 3 additions & 1 deletion keyboards/keychron/q5/q5.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return true;
}

__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; }
// RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
# if defined(CAPS_LOCK_LED_INDEX)
if (host_keyboard_led_state().caps_lock) {
Expand All @@ -89,6 +90,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min,
}
}
# endif // NUM_LOCK_LED_INDEX
return true;
}

#endif // RGB_MATRIX_ENABLE...