Change DRIVER_LED_COUNT
to {LED,RGB}_MATRIX_LED_COUNT
(#18399)
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
#define RGB_DI_PIN B3
|
||||
#define DRIVER_LED_TOTAL 42
|
||||
#define RGB_MATRIX_LED_COUNT 42
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255
|
||||
|
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
led_config_t g_led_config = { {
|
||||
// Key Matrix to LED Index
|
||||
// WS2812 LED strings are addressed from 0 (1st) to DRIVER_LED_TOTAL-1 (last)
|
||||
// WS2812 LED strings are addressed from 0 (1st) to RGB_MATRIX_LED_COUNT-1 (last)
|
||||
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30 },
|
||||
{ 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, __, 19 },
|
||||
{ 18, 17, 16, 15, 14, 13, 12, 11, 10, __, 9, 8 },
|
||||
|
@@ -22,9 +22,9 @@
|
||||
*
|
||||
* */
|
||||
#ifndef ID63_DISABLE_UNDERGLOW
|
||||
#define DRIVER_LED_TOTAL 75
|
||||
#define RGB_MATRIX_LED_COUNT 75
|
||||
#else
|
||||
#define DRIVER_LED_TOTAL (75 - 12)
|
||||
#define RGB_MATRIX_LED_COUNT (75 - 12)
|
||||
#endif
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
|
@@ -12,9 +12,9 @@
|
||||
// RGB Matrix config
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
#ifndef ID67_DISABLE_UNDERGLOW
|
||||
#define DRIVER_LED_TOTAL 77
|
||||
#define RGB_MATRIX_LED_COUNT 77
|
||||
#else
|
||||
#define DRIVER_LED_TOTAL (77 - 10)
|
||||
#define RGB_MATRIX_LED_COUNT (77 - 10)
|
||||
#endif
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
|
@@ -34,7 +34,7 @@ void matrix_scan_user(void) {
|
||||
if (current_effect >= RGB_MATRIX_SOLID_REACTIVE_SIMPLE && current_effect <= RGB_MATRIX_SOLID_MULTISPLASH) {
|
||||
// set all underglow leds to current color
|
||||
RGB current_color = hsv_to_rgb(rgb_matrix_get_hsv());
|
||||
for (int i = DRIVER_LED_TOTAL - DRIVER_LED_UNDERGLOW; i < DRIVER_LED_TOTAL; i++) {
|
||||
for (int i = RGB_MATRIX_LED_COUNT - DRIVER_LED_UNDERGLOW; i < RGB_MATRIX_LED_COUNT; i++) {
|
||||
rgb_matrix_set_color(i, current_color.r, current_color.g, current_color.b);
|
||||
}
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
#define LED_FLAG_ALPHA_KEY 0x10 // Alpha keys (for Caps Lock)
|
||||
#define LED_FLAG_LAYER_IND 0x20 // Layer indicator
|
||||
|
||||
const uint8_t g_led_config_new_flags[DRIVER_LED_TOTAL] = {
|
||||
const uint8_t g_led_config_new_flags[RGB_MATRIX_LED_COUNT] = {
|
||||
// Extended LED Index to Flag
|
||||
// ** Remember: on ID67 this is in reverse order
|
||||
0x21, 0x01, 0x01, 0x01, 0x01, 0x04, 0x01, 0x01, 0x21, // Spc row
|
||||
@@ -147,7 +147,7 @@ static uint16_t recording_timer;
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
// override `config.h` flags with new values
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) g_led_config.flags[i] = g_led_config_new_flags[i];
|
||||
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) g_led_config.flags[i] = g_led_config_new_flags[i];
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#undef RGB_DI_PIN
|
||||
#define RGB_DI_PIN F0
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define DRIVER_LED_TOTAL 85 /* 10 Bottom 75 top*/
|
||||
# define RGB_MATRIX_LED_COUNT 85 /* 10 Bottom 75 top*/
|
||||
// RGB Matrix Animation modes. Explicitly enabled
|
||||
// For full list of effects, see:
|
||||
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
|
||||
|
@@ -22,7 +22,7 @@
|
||||
// RGB Matrix config
|
||||
#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE)
|
||||
|
||||
#define DRIVER_LED_TOTAL 94
|
||||
#define RGB_MATRIX_LED_COUNT 94
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255
|
||||
|
@@ -14,7 +14,7 @@
|
||||
// RGB Matrix config
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
|
||||
#define DRIVER_LED_TOTAL 103
|
||||
#define RGB_MATRIX_LED_COUNT 103
|
||||
|
||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // limits maximum brightness of LEDs to x out of 255. If not defined maximum brightness is set to 255
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE)
|
||||
|
||||
// The number of LEDs connected
|
||||
#define DRIVER_LED_TOTAL 31
|
||||
#define RGB_MATRIX_LED_COUNT 31
|
||||
|
||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value
|
||||
|
@@ -10,9 +10,9 @@
|
||||
|
||||
#if defined(RGB_DI_PIN) && defined(RGB_MATRIX_ENABLE)
|
||||
#ifndef ID27_DISABLE_UNDERGLOW
|
||||
#define DRIVER_LED_TOTAL 31 // The number of LEDs connected
|
||||
#define RGB_MATRIX_LED_COUNT 31 // The number of LEDs connected
|
||||
#else
|
||||
#define DRIVER_LED_TOTAL 27 // -4 disabled underglow LEDs
|
||||
#define RGB_MATRIX_LED_COUNT 27 // -4 disabled underglow LEDs
|
||||
#endif
|
||||
|
||||
// #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // don't use, too few key to make it look good
|
||||
|
Reference in New Issue
Block a user