Rename RGBLED_NUM
-> RGBLIGHT_LED_COUNT
(#22570)
This commit is contained in:
parent
3c7e9a6827
commit
e648155113
@ -142,12 +142,12 @@
|
||||
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
|
||||
|
||||
// RGBLight
|
||||
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
"RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"},
|
||||
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
|
||||
"RGBLIGHT_LED_COUNT": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLIGHT_LED_MAP": {"info_key": "rgblight.led_map", "value_type": "array.int"},
|
||||
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
|
||||
"RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"},
|
||||
|
@ -223,7 +223,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
* Adds ability to [blink](feature_rgblight.md?id=lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
|
||||
* If defined, then [lighting layers](feature_rgblight?id=overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* `#define RGBLED_NUM 12`
|
||||
* `#define RGBLIGHT_LED_COUNT 12`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
* Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
|
||||
|
@ -33,13 +33,13 @@ RGBLIGHT_DRIVER = apa102
|
||||
|
||||
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. For APA102 LEDs, you must also define the clock pin. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
|
||||
|
||||
|Define |Description |
|
||||
|---------------|-------------------------------------------------------------------------|
|
||||
|`WS2812_DI_PIN`|The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN`|The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN`|The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLED_NUM` |The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half|
|
||||
|Define |Description |
|
||||
|--------------------|-------------------------------------------------------------------------|
|
||||
|`WS2812_DI_PIN` |The pin connected to the data pin of the LEDs (WS2812) |
|
||||
|`APA102_DI_PIN` |The pin connected to the data pin of the LEDs (APA102) |
|
||||
|`APA102_CI_PIN` |The pin connected to the clock pin of the LEDs (APA102) |
|
||||
|`RGBLIGHT_LED_COUNT`|The number of LEDs connected |
|
||||
|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half|
|
||||
|
||||
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
|
||||
|
||||
@ -152,28 +152,28 @@ Use these defines to add or remove animations from the firmware. When you are ru
|
||||
|
||||
The following options are used to tweak the various animations:
|
||||
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|-------------|-----------------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||
|Define |Default |Description |
|
||||
|------------------------------------|--------------------|-----------------------------------------------------------------------------------------------|
|
||||
|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined* |If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|
||||
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`40` |How long (in milliseconds) to wait between animation steps for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLIGHT_LED_COUNT`|The number of LEDs to have the "Knight" animation travel |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
|
||||
|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
|
||||
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
|
||||
|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_LIFE` |`200` |Adjusts how quickly each LED brightens and dims when twinkling (in animation steps) |
|
||||
|`RGBLIGHT_EFFECT_TWINKLE_PROBABILITY`|`1/127` |Adjusts how likely each LED is to twinkle (on each animation step) |
|
||||
|
||||
### Example Usage to Reduce Memory Footprint
|
||||
1. Use `#undef` to selectively disable animations. The following would disable two animations and save about 4KiB:
|
||||
|
||||
```diff
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
+#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
+#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
```
|
||||
@ -386,10 +386,10 @@ rgblight_set(); // Utility functions do not call rgblight_set() automatically, s
|
||||
#### direct operation
|
||||
|Function |Description |
|
||||
|--------------------------------------------|-------------|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
|
||||
|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM) |
|
||||
|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM) |
|
||||
|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM)|
|
||||
|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLIGHT_LED_COUNT` (not written to EEPROM)|
|
||||
|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
|
||||
@ -519,7 +519,7 @@ By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED
|
||||
```c
|
||||
// config.h
|
||||
|
||||
#define RGBLED_NUM 4
|
||||
#define RGBLIGHT_LED_COUNT 4
|
||||
#define RGBLIGHT_LED_MAP { 3, 2, 1, 0 }
|
||||
|
||||
```
|
||||
@ -541,7 +541,7 @@ In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` togeth
|
||||
|
||||
```c
|
||||
// config.h
|
||||
#define RGBLED_NUM 8
|
||||
#define RGBLIGHT_LED_COUNT 8
|
||||
#define RGBLIGHT_LED_MAP { 7, 6, 5, 4, 3, 2, 1, 0 }
|
||||
|
||||
// some source
|
||||
|
@ -169,11 +169,11 @@ The `post_rules.mk` file can interpret `features` of a keyboard-level before `co
|
||||
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=30
|
||||
OPT_DEFS += -DRGBLIGHT_LED_COUNT=30
|
||||
endif
|
||||
ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow)
|
||||
RGBLIGHT_ENABLE = yes
|
||||
OPT_DEFS += -DRGBLED_NUM=6
|
||||
OPT_DEFS += -DRGBLIGHT_LED_COUNT=6
|
||||
endif
|
||||
```
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#if defined(RGBLED_NUM)
|
||||
# define APA102_LED_COUNT RGBLED_NUM
|
||||
#elif defined(RGB_MATRIX_LED_COUNT)
|
||||
#if defined(RGBLIGHT_APA102)
|
||||
# define APA102_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#elif defined(RGB_MATRIX_APA102)
|
||||
# define APA102_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
|
@ -56,9 +56,9 @@
|
||||
# define WS2812_TRST_US 280
|
||||
#endif
|
||||
|
||||
#if defined(RGBLED_NUM)
|
||||
# define WS2812_LED_COUNT RGBLED_NUM
|
||||
#elif defined(RGB_MATRIX_LED_COUNT)
|
||||
#if defined(RGBLIGHT_WS2812)
|
||||
# define WS2812_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#elif defined(RGB_MATRIX_WS2812)
|
||||
# define WS2812_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "color.h"
|
||||
|
||||
static inline void rgblite_setrgb(RGB rgb) {
|
||||
rgb_led_t leds[RGBLED_NUM] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
|
||||
ws2812_setleds(leds, RGBLED_NUM);
|
||||
rgb_led_t leds[RGBLIGHT_LED_COUNT] = {{.r = rgb.r, .g = rgb.g, .b = rgb.b}};
|
||||
ws2812_setleds(leds, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
|
||||
static void rgblite_increase_hue(void) {
|
||||
|
@ -24,35 +24,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_SPLIT
|
||||
#ifdef RGBLED_BACK
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 48
|
||||
#define RGBLIGHT_LED_COUNT 48
|
||||
#define RGBLED_SPLIT { 24, 24 }
|
||||
#else
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_LED_COUNT 24
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_BOTH
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 60
|
||||
#define RGBLIGHT_LED_COUNT 60
|
||||
#define RGBLED_SPLIT { 30, 30 }
|
||||
#else
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_LED_COUNT 30
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
@ -60,10 +60,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
|
@ -24,35 +24,35 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_SPLIT
|
||||
#ifdef RGBLED_BACK
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 48
|
||||
#define RGBLIGHT_LED_COUNT 48
|
||||
#define RGBLED_SPLIT { 24, 24 }
|
||||
#else
|
||||
#define RGBLED_NUM 24
|
||||
#define RGBLIGHT_LED_COUNT 24
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_BOTH
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 60
|
||||
#define RGBLIGHT_LED_COUNT 60
|
||||
#define RGBLED_SPLIT { 30, 30 }
|
||||
#else
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_LED_COUNT 30
|
||||
#endif
|
||||
#else
|
||||
#ifdef RGBLED_CONT
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLED_SPLIT { 6, 6 }
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
@ -60,10 +60,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if (RGBLED_NUM <= 6) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 12))
|
||||
#if (RGBLIGHT_LED_COUNT <= 6) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 12))
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#if (RGBLED_NUM <= 16) || (defined(RGBLED_CONT) && (RGBLED_NUM <= 32))
|
||||
#if (RGBLIGHT_LED_COUNT <= 16) || (defined(RGBLED_CONT) && (RGBLIGHT_LED_COUNT <= 32))
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
@ -26,6 +26,9 @@
|
||||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
@ -26,6 +26,9 @@
|
||||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
#define RGBLED_NUM 1
|
||||
|
||||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT
|
||||
#define WS2812_PWM_DRIVER PWMD1
|
||||
#define WS2812_PWM_CHANNEL 3
|
||||
|
@ -26,6 +26,9 @@
|
||||
"backing_size": 8192
|
||||
}
|
||||
},
|
||||
"rgblight": {
|
||||
"led_count": 1
|
||||
},
|
||||
"ws2812": {
|
||||
"pin": "B15"
|
||||
},
|
||||
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 170
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 50
|
||||
#define RGBLIGHT_LED_COUNT 50
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
@ -27,8 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define EE_HANDS
|
||||
|
||||
// Underglow
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 14 // Number of LEDs
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define EE_HANDS
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 7
|
||||
#if RGBLIGHT_LED_COUNT <= 7
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#endif
|
||||
|
@ -6,6 +6,6 @@ void backlight_init_ports(void);
|
||||
void backlight_set_state(bool cfg[7]);
|
||||
void backlight_update_state(void);
|
||||
void backlight_toggle_rgb(bool enabled);
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLED_NUM][3]);
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLIGHT_LED_COUNT][3]);
|
||||
void backlight_set(uint8_t level);
|
||||
void send_color(uint8_t r, uint8_t g, uint8_t b, enum Device device);
|
||||
|
@ -44,10 +44,10 @@ uint8_t backlight_state_led = 1<<STATE_LED_LAYER_0;
|
||||
|
||||
void backlight_toggle_rgb(bool enabled)
|
||||
{
|
||||
uint8_t rgb[RGBLED_NUM][3] = { 0 };
|
||||
uint8_t rgb[RGBLIGHT_LED_COUNT][3] = { 0 };
|
||||
|
||||
if(enabled) {
|
||||
for(uint8_t i = 0; i < RGBLED_NUM; ++i) {
|
||||
for(uint8_t i = 0; i < RGBLIGHT_LED_COUNT; ++i) {
|
||||
rgb[i][0] = backlight_rgb_r;
|
||||
rgb[i][1] = backlight_rgb_g;
|
||||
rgb[i][2] = backlight_rgb_b;
|
||||
@ -56,10 +56,10 @@ void backlight_toggle_rgb(bool enabled)
|
||||
backlight_set_rgb(rgb);
|
||||
}
|
||||
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLED_NUM][3])
|
||||
void backlight_set_rgb(uint8_t cfg[RGBLIGHT_LED_COUNT][3])
|
||||
{
|
||||
cli();
|
||||
for(uint8_t i = 0; i < RGBLED_NUM; ++i) {
|
||||
for(uint8_t i = 0; i < RGBLIGHT_LED_COUNT; ++i) {
|
||||
send_color(cfg[i][0], cfg[i][1], cfg[i][2], Device_PCBRGB);
|
||||
}
|
||||
sei();
|
||||
|
@ -31,7 +31,7 @@ void setleds_custom(rgb_led_t *led, uint16_t led_num) {
|
||||
// prevent right-half code from trying to bitbang all 30
|
||||
// so with 30 LEDs, we count from 29 to 15 here, and the
|
||||
// other half does 0 to 14.
|
||||
uint8_t half_led_num = RGBLED_NUM / 2;
|
||||
uint8_t half_led_num = RGBLIGHT_LED_COUNT / 2;
|
||||
for (i = half_led_num + half_led_num - 1; i >= half_led_num; --i)
|
||||
# elif defined(ERGODOX_LED_15_MIRROR)
|
||||
for (i = 0; i < led_num; ++i)
|
||||
|
@ -33,8 +33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifdef ERGODOX_LED_30
|
||||
// If using 30 LEDs, then define that many
|
||||
# define RGBLED_NUM 30 // Number of LEDs
|
||||
# define RGBLIGHT_LED_COUNT 30 // Number of LEDs
|
||||
#else
|
||||
// If not, then only define 15
|
||||
# define RGBLED_NUM 15 // Number of LEDs
|
||||
# define RGBLIGHT_LED_COUNT 15 // Number of LEDs
|
||||
#endif
|
||||
|
@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_COUNT 14
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
// #undef RGBLED_NUM
|
||||
// #define RGBLED_NUM 14
|
||||
// #undef RGBLIGHT_LED_COUNT
|
||||
// #define RGBLIGHT_LED_COUNT 14
|
||||
// #define RGBLIGHT_HUE_STEP 8
|
||||
// #define RGBLIGHT_SAT_STEP 8
|
||||
// #define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -21,7 +21,7 @@
|
||||
/*RGB*/
|
||||
/*Repurpose Insert LED */
|
||||
#define WS2812_DI_PIN B5
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_LED_COUNT 16
|
||||
#define RGBLIGHT_DEFAULT_HUE 127
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
|
@ -21,7 +21,7 @@
|
||||
/*RGB*/
|
||||
/*Repurpose Insert LED */
|
||||
#define WS2812_DI_PIN B5
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_LED_COUNT 16
|
||||
#define RGBLIGHT_DEFAULT_HUE 127
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
|
@ -19,4 +19,4 @@ See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_to
|
||||
|
||||
## RGB LED support
|
||||
|
||||
The universal PCB supports RGB LEDs as an LED strip, but is not supplied with one. To use RGB LEDs, you should configure the RGBLED_NUM to match the number of LEDs on your strip.
|
||||
The universal PCB supports RGB LEDs as an LED strip, but is not supplied with one. To use RGB LEDs, you should configure the RGBLIGHT_LED_COUNT to match the number of LEDs on your strip.
|
||||
|
@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# undef MATRIX_COL_PINS_RIGHT
|
||||
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 120
|
||||
# undef RGBLIGHT_LED_COUNT
|
||||
# define RGBLIGHT_LED_COUNT 120
|
||||
# undef RGBLIGHT_LED_MAP
|
||||
# define RGBLIGHT_LED_MAP { \
|
||||
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
|
||||
|
@ -7,8 +7,8 @@
|
||||
# undef MATRIX_COL_PINS_RIGHT
|
||||
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 120
|
||||
# undef RGBLIGHT_LED_COUNT
|
||||
# define RGBLIGHT_LED_COUNT 120
|
||||
# undef RGBLIGHT_LED_MAP
|
||||
# define RGBLIGHT_LED_MAP { \
|
||||
108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, \
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#ifdef RGBLED_NUM
|
||||
#undef RGBLED_NUM
|
||||
#ifdef RGBLIGHT_LED_COUNT
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#endif
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 73
|
||||
|
@ -30,8 +30,8 @@
|
||||
#define MOUSEKEY_WHEEL_MAX_SPEED 8
|
||||
#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 2
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 2
|
||||
#define RGBLED_SPLIT {1, 1}
|
||||
|
||||
// Don't turn off lights when the host goes to sleep.
|
||||
|
@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 7, 0},
|
||||
{7, 24, HSV_RED},
|
||||
{24, RGBLED_NUM, 0}
|
||||
{24, RGBLIGHT_LED_COUNT, 0}
|
||||
);
|
||||
// Light all LEDs in green when keyboard layer 1 is active
|
||||
const rgblight_segment_t PROGMEM layer_lower[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#define RGBLED_NUM 40
|
||||
#define RGBLIGHT_LED_COUNT 40
|
||||
#define APA102_DEFAULT_BRIGHTNESS 5
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
|
@ -50,20 +50,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Helix keyboard RGB LED support
|
||||
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||
#ifdef RGBLED_BACK
|
||||
#define RGBLED_NUM 25
|
||||
#define RGBLIGHT_LED_COUNT 25
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
|
@ -31,20 +31,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// Helix keyboard RGB LED support
|
||||
// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes
|
||||
#ifdef RGBLED_BACK
|
||||
#define RGBLED_NUM 32
|
||||
#define RGBLIGHT_LED_COUNT 32
|
||||
#else
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#endif
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 35
|
||||
|
@ -70,7 +70,7 @@ bool led_update_kb(led_t led_state) {
|
||||
|
||||
__attribute__ ((weak))
|
||||
void keyboard_post_init_user(void) {
|
||||
rgblight_set_effect_range(3, RGBLED_NUM-3);
|
||||
rgblight_set_effect_range(3, RGBLIGHT_LED_COUNT-3);
|
||||
led_t led_state = {
|
||||
.caps_lock = true,
|
||||
.num_lock = true,
|
||||
|
@ -36,10 +36,10 @@ static bool blink_state = false;
|
||||
static uint8_t isRecording = 0;
|
||||
|
||||
#ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812
|
||||
# if RGBLED_NUM < 3
|
||||
# if RGBLIGHT_LED_COUNT < 3
|
||||
# error we need at least 3 RGB LEDs!
|
||||
# endif
|
||||
static rgb_led_t led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}};
|
||||
static rgb_led_t led[RGBLIGHT_LED_COUNT] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255}};
|
||||
|
||||
# define BRIGHT 32
|
||||
# define DIM 6
|
||||
@ -84,13 +84,13 @@ void sleep_led_enable(void) {
|
||||
led[0] = black;
|
||||
led[1] = black;
|
||||
led[2] = black;
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
ws2812_setleds(led, RGBLIGHT_LED_COUNT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
#ifdef KEYBOARD_ibm_model_m_mschwingen_led_ws2812
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
ws2812_setleds(led, RGBLIGHT_LED_COUNT);
|
||||
#else
|
||||
/* Set status LEDs pins to output and Low (on) */
|
||||
setPinOutput(MODELM_LED_CAPSLOCK);
|
||||
@ -146,7 +146,7 @@ static void led_update_rgb(void) {
|
||||
break;
|
||||
}
|
||||
if (!suspend_active) {
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
ws2812_setleds(led, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,14 +22,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_TIMER
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 130
|
||||
#endif
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#else
|
||||
#if RGBLED_NUM <= 6
|
||||
#if RGBLIGHT_LED_COUNT <= 6
|
||||
#define RGBLIGHT_LIMIT_VAL 90
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 45
|
||||
|
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 255
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 130
|
||||
# endif
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
#else
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 90
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 45
|
||||
|
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 255
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 130
|
||||
# endif
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
#else
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 90
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 45
|
||||
|
@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_COUNT 14
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
|
@ -9,8 +9,8 @@ By default, the source is set up for 16 LEDs on the F5 breakout pin. See [includ
|
||||
```c
|
||||
#pragma once
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM <number of leds>
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT <number of leds>
|
||||
```
|
||||
|
||||
To enable RGB Underglow, simply add a `rules.mk` file containing `RGBLIGHT_ENABLE = yes` alongside your `keymap.c` file, and compile as normal:
|
||||
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -42,6 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 10
|
||||
#define RGBLIGHT_LED_COUNT 10
|
||||
|
||||
#define NO_MUSIC_MODE
|
||||
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 27
|
||||
#define RGBLIGHT_LED_COUNT 27
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Underglow
|
||||
/*
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 14 // Number of LEDs
|
||||
#define RGBLIGHT_SLEEP
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
// Underglow
|
||||
/*
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 14 // Number of LEDs
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 14 // Number of LEDs
|
||||
#define RGBLIGHT_SLEEP
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 2 // Number of LEDs
|
||||
#define RGBLIGHT_LED_COUNT 2 // Number of LEDs
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
@ -18,10 +18,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#ifndef RS_EXTRA_LED
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLED_SPLIT {12, 0}
|
||||
#else
|
||||
#define RGBLED_NUM 32
|
||||
#define RGBLIGHT_LED_COUNT 32
|
||||
#define RGBLED_SPLIT {12, 20}
|
||||
#endif
|
||||
|
||||
|
@ -17,15 +17,15 @@ extern rgblight_config_t rgblight_config;
|
||||
|
||||
// led 0 for caps lock, led 1 for scroll lock, led 3 for num lock
|
||||
// led 4 for layer 1, led 5 for layer 2, led 6 for layer 3, led 7 for layer 4
|
||||
#if RGBLED_NUM < 7
|
||||
#error "MUST set the RGBLED_NUM bigger than 7"
|
||||
#if RGBLIGHT_LED_COUNT < 7
|
||||
#error "MUST set the RGBLIGHT_LED_COUNT bigger than 7"
|
||||
#endif
|
||||
rgb_led_t noah_leds[RGBLED_NUM];
|
||||
rgb_led_t noah_leds[RGBLIGHT_LED_COUNT];
|
||||
static bool noah_led_mode = false;
|
||||
void setleds_custom(rgb_led_t *ledarray, uint16_t num_leds) {
|
||||
memset(&noah_leds[0], 0, sizeof(noah_leds));
|
||||
if (!rgblight_config.enable) {
|
||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||
for (uint8_t i = 0; i < RGBLIGHT_LED_COUNT; i++) {
|
||||
ledarray[i].r = 0;
|
||||
ledarray[i].g = 0;
|
||||
ledarray[i].b = 0;
|
||||
@ -51,7 +51,7 @@ void setleds_custom(rgb_led_t *ledarray, uint16_t num_leds) {
|
||||
memcpy(&noah_leds[0], &ledarray[0], sizeof(noah_leds));
|
||||
}
|
||||
|
||||
ws2812_setleds(noah_leds, RGBLED_NUM);
|
||||
ws2812_setleds(noah_leds, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
|
||||
const rgblight_driver_t rgblight_driver = {
|
||||
|
@ -36,7 +36,6 @@
|
||||
|
||||
/* RGB Matrix config */
|
||||
#define RGB_EN_PIN A8
|
||||
#define RGBLED_NUM 83
|
||||
#define RGB_MATRIX_LED_COUNT 83
|
||||
#define RGB_MATRIX_CENTER { 62, 42 }
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
/* Copyright 2023 ArthurCyy <https://github.com/ArthurCyy>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "blackio83.h"
|
@ -59,13 +59,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_BLUE}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_BLUE}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_GREEN}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_GREEN}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM _top_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_RED}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_RED}
|
||||
);
|
||||
|
||||
const rgblight_segment_t* const PROGMEM _rgb_layers[] =
|
||||
|
@ -76,13 +76,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
};
|
||||
|
||||
const rgblight_segment_t PROGMEM _base_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_BLUE}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_BLUE}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM _middle_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_GREEN}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_GREEN}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM _top_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_RED}
|
||||
{0, RGBLIGHT_LED_COUNT, HSV_RED}
|
||||
);
|
||||
|
||||
const rgblight_segment_t* const PROGMEM _rgb_layers[] =
|
||||
|
@ -26,10 +26,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -26,10 +26,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -26,10 +26,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -26,10 +26,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -29,10 +29,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -29,10 +29,10 @@ enum layer_names {
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_PURPLE});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CYAN});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_GREEN});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
#endif
|
||||
|
@ -9,10 +9,10 @@ static bool toggle_rse = false;
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_OFF});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_AZURE});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_CORAL});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLED_NUM, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_OFF});
|
||||
const rgblight_segment_t PROGMEM my_lwr_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_AZURE});
|
||||
const rgblight_segment_t PROGMEM my_rse_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_CORAL});
|
||||
const rgblight_segment_t PROGMEM my_adj_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, RGBLIGHT_LED_COUNT, HSV_RED});
|
||||
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(my_qwerty_layer, my_lwr_layer, my_rse_layer, my_adj_layer);
|
||||
|
||||
|
@ -43,11 +43,11 @@ typedef struct{
|
||||
|
||||
rgb_;
|
||||
#define colorAGSize 10
|
||||
#define colorBGSize RGBLED_NUM-10
|
||||
#define colorBGSize RGBLIGHT_LED_COUNT-10
|
||||
|
||||
typedef struct{
|
||||
rgb_ colorAG[colorAGSize];
|
||||
rgb_ colorBG[RGBLED_NUM-10];
|
||||
rgb_ colorBG[RGBLIGHT_LED_COUNT-10];
|
||||
}
|
||||
|
||||
backLedRgbG_;
|
||||
|
@ -54,14 +54,14 @@ void housekeeping_task_kb(void)
|
||||
alert = !alert;
|
||||
last_ticks = timer_read();
|
||||
}
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
ws2812_setleds(led, RGBLIGHT_LED_COUNT);
|
||||
} else {
|
||||
if (backup) {
|
||||
led[4].r = caps_led.r;
|
||||
led[4].g = caps_led.g;
|
||||
led[4].b = caps_led.b;
|
||||
backup = false;
|
||||
ws2812_setleds(led, RGBLED_NUM);
|
||||
ws2812_setleds(led, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
}
|
||||
housekeeping_task_user();
|
||||
@ -80,7 +80,7 @@ void setleds_custom(rgb_led_t *start_led, uint16_t num_leds)
|
||||
uint8_t tmp = start_led[4].g;
|
||||
start_led[4].g = start_led[4].r;
|
||||
start_led[4].r = tmp;
|
||||
ws2812_setleds(start_led, RGBLED_NUM);
|
||||
ws2812_setleds(start_led, RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
|
||||
const rgblight_driver_t rgblight_driver = {
|
||||
|
@ -1,14 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 255
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 130
|
||||
# endif
|
||||
# define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
# if RGBLED_NUM <= 6
|
||||
# if RGBLIGHT_LED_COUNT <= 6
|
||||
# define RGBLIGHT_LIMIT_VAL 90
|
||||
# else
|
||||
# define RGBLIGHT_LIMIT_VAL 45
|
||||
|
@ -112,7 +112,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
} else {
|
||||
rgblight_timer_disable();
|
||||
uint8_t val = rgblight_get_val();
|
||||
rgblight_sethsv_range(255, 255, val, 0, RGBLED_NUM-1);
|
||||
rgblight_sethsv_range(255, 255, val, 0, RGBLIGHT_LED_COUNT-1);
|
||||
}
|
||||
deafened = !deafened;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_COUNT 14
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_COUNT 14
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -19,7 +19,7 @@
|
||||
// place overrides here
|
||||
|
||||
#define WS2812_DI_PIN D3
|
||||
#define RGBLED_NUM 9
|
||||
#define RGBLIGHT_LED_COUNT 9
|
||||
#define RGBLIGHT_HUE_STEP 16
|
||||
#define RGBLIGHT_SAT_STEP 16
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
|
@ -19,7 +19,7 @@
|
||||
// place overrides here
|
||||
|
||||
#define WS2812_DI_PIN D3
|
||||
#define RGBLED_NUM 9
|
||||
#define RGBLIGHT_LED_COUNT 9
|
||||
#define RGBLIGHT_HUE_STEP 16
|
||||
#define RGBLIGHT_SAT_STEP 16
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
|
@ -19,7 +19,7 @@
|
||||
// place overrides here
|
||||
|
||||
#define WS2812_DI_PIN D3
|
||||
#define RGBLED_NUM 11
|
||||
#define RGBLIGHT_LED_COUNT 11
|
||||
#define RGBLIGHT_HUE_STEP 16
|
||||
#define RGBLIGHT_SAT_STEP 16
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
|
@ -19,7 +19,7 @@
|
||||
// place overrides here
|
||||
|
||||
#define WS2812_DI_PIN D3
|
||||
#define RGBLED_NUM 6
|
||||
#define RGBLIGHT_LED_COUNT 6
|
||||
#define RGBLIGHT_HUE_STEP 16
|
||||
#define RGBLIGHT_SAT_STEP 16
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
|
@ -3,4 +3,4 @@
|
||||
__REVIUNG39S is simple version__
|
||||
|
||||
The number of RGB LEDs is set to 6.
|
||||
To change the number of RGB LEDs, change the "#define RGBLED_NUM 6" number in "default_s / config.h".
|
||||
To change the number of RGB LEDs, change the "#define RGBLIGHT_LED_COUNT 6" number in "default_s / config.h".
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
// --- RGB underglow ---
|
||||
#define WS2812_DI_PIN B7
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_HUE_STEP 16
|
||||
#define RGBLIGHT_SAT_STEP 16
|
||||
#define RGBLIGHT_VAL_STEP 16
|
||||
|
@ -19,10 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#pragma once
|
||||
|
||||
#ifdef LED_MIRRORED
|
||||
#define RGBLED_NUM 35
|
||||
#define RGBLIGHT_LED_COUNT 35
|
||||
#else
|
||||
#define RGBLED_NUM 70
|
||||
#define RGBLIGHT_LED_COUNT 70
|
||||
#endif
|
||||
#define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
#define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
|
||||
#define RGB_MATRIX_CENTER { 112, 35 }
|
||||
|
@ -24,28 +24,28 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifdef LED_MIRRORED
|
||||
#ifdef FULLHAND_ENABLE
|
||||
#define FULLHAND_LEDS 24
|
||||
#define RGBLED_NUM 74
|
||||
#define RGBLIGHT_LED_COUNT 74
|
||||
#elif SF_ENABLE
|
||||
#define FULLHAND_LEDS 38
|
||||
#define RGBLED_NUM 81
|
||||
#define RGBLIGHT_LED_COUNT 81
|
||||
#else
|
||||
#define FULLHAND_LEDS 0
|
||||
#define RGBLED_NUM 62
|
||||
#define RGBLIGHT_LED_COUNT 62
|
||||
#endif
|
||||
#else
|
||||
#ifdef FULLHAND_ENABLE
|
||||
#define FULLHAND_LEDS 24
|
||||
#define RGBLED_NUM 148
|
||||
#define RGBLIGHT_LED_COUNT 148
|
||||
#elif SF_ENABLE
|
||||
#define FULLHAND_LEDS 38
|
||||
#define RGBLED_NUM 162
|
||||
#define RGBLIGHT_LED_COUNT 162
|
||||
#else
|
||||
#define FULLHAND_LEDS 0
|
||||
#define RGBLED_NUM 124
|
||||
#define RGBLIGHT_LED_COUNT 124
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
#define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
|
||||
#define RGB_MATRIX_CENTER { 112, 37 }
|
||||
|
||||
|
@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -35,7 +35,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 16
|
||||
#define RGBLIGHT_LED_COUNT 16
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
|
@ -22,9 +22,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define EE_HANDS
|
||||
|
||||
#ifndef RGBLIGHT_SPLIT_ENABLE
|
||||
#define RGBLED_NUM 30
|
||||
#define RGBLIGHT_LED_COUNT 30
|
||||
#else
|
||||
#define RGBLED_NUM 60
|
||||
#define RGBLIGHT_LED_COUNT 60
|
||||
#endif
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 60
|
||||
|
@ -25,11 +25,11 @@
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#ifdef RGBLED_NUM
|
||||
#undef RGBLED_NUM
|
||||
#ifdef RGBLIGHT_LED_COUNT
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#endif
|
||||
|
||||
#define RGBLED_NUM 55 // Number of LEDs
|
||||
#define RGBLIGHT_LED_COUNT 55 // Number of LEDs
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLED_SPLIT { 48, 7 }
|
||||
|
||||
|
@ -25,10 +25,10 @@
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#ifdef RGBLED_NUM
|
||||
#undef RGBLED_NUM
|
||||
#ifdef RGBLIGHT_LED_COUNT
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#endif
|
||||
|
||||
#define RGBLED_NUM 69 // Number of LEDs
|
||||
#define RGBLIGHT_LED_COUNT 69 // Number of LEDs
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLED_SPLIT { 48, 21 }
|
||||
|
@ -21,8 +21,8 @@
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#ifdef RGBLED_NUM
|
||||
#undef RGBLED_NUM
|
||||
#ifdef RGBLIGHT_LED_COUNT
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#endif
|
||||
|
||||
#define RGB_MATRIX_LED_COUNT 48
|
||||
|
@ -25,6 +25,6 @@
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 180
|
||||
|
||||
#define RGBLED_NUM 12 // Number of LEDs
|
||||
#define RGBLIGHT_LED_COUNT 12 // Number of LEDs
|
||||
#define RGBLIGHT_LED_MAP { 0, 1, 3, 2, 2, 3, 2, 3, 4, 5, 6, 7 }
|
||||
|
||||
|
@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 2 // 1 to 2.7
|
||||
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
|
||||
/*== customize snake effect ==*/
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH RGBLED_NUM
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH RGBLIGHT_LED_COUNT
|
||||
/*== customize knight effect ==*/
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 6
|
||||
#endif
|
||||
|
@ -90,7 +90,7 @@ static void setupForFlashing(void) {
|
||||
// Set alternating backlight colors
|
||||
const uint8_t max = 20;
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
for (size_t i = 0; i < RGBLED_NUM; ++i) {
|
||||
for (size_t i = 0; i < RGBLIGHT_LED_COUNT; ++i) {
|
||||
rgb_led_t *led_ = (rgb_led_t *)&led[i];
|
||||
switch (i % 2) {
|
||||
case 0:
|
||||
|
@ -49,13 +49,13 @@
|
||||
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#define RGBLED_NUM 35 // Number of LEDs
|
||||
#define RGBLED_NUM 35 // Number of LEDs
|
||||
#define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
#define RGBLIGHT_LED_COUNT 35 // Number of LEDs
|
||||
#define RGBLIGHT_LED_COUNT 35 // Number of LEDs
|
||||
#define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
|
||||
//#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
@ -68,11 +68,11 @@
|
||||
//#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
//#define RGBLIGHT_EFFECT_TWINKLE
|
||||
|
||||
#define RGBLED_NUM 70
|
||||
#define RGBLIGHT_LED_COUNT 70
|
||||
//#define RGBLED_SPLIT
|
||||
#define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet
|
||||
|
||||
//#define RGBLED_NUM 30
|
||||
//#define RGBLIGHT_LED_COUNT 30
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
@ -24,11 +24,11 @@ for more options. */
|
||||
#if defined(KEYBOARD_sofle_rev1)
|
||||
// Add RGB underglow and top facing lighting
|
||||
# define WS2812_DI_PIN D3
|
||||
# define RGBLED_NUM 72
|
||||
# define RGBLIGHT_LED_COUNT 72
|
||||
# define RGBLED_SPLIT \
|
||||
{ 36, 36 }
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
# define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
# define RGB_MATRIX_SPLIT RGBLED_SPLIT
|
||||
# define SPLIT_TRANSPORT_MIRROR
|
||||
# else
|
||||
|
@ -38,7 +38,7 @@
|
||||
/* RGB config */
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define SPLIT_TRANSPORT_MIRROR
|
||||
# define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
# define RGB_MATRIX_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
# define RGB_MATRIX_KEYPRESSES
|
||||
|
@ -20,7 +20,7 @@
|
||||
* No external LED PCB: 10
|
||||
* External LED PCB: 14
|
||||
*/
|
||||
#define RGBLED_NUM 14
|
||||
#define RGBLIGHT_LED_COUNT 14
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 17 // Layer Indicator(2) + Rotary Encoder(5) + Optional(2) + Under(8)
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_LED_COUNT 17 // Layer Indicator(2) + Rotary Encoder(5) + Optional(2) + Under(8)
|
||||
|
||||
#undef RGBLIGHT_LED_MAP
|
||||
#define RGBLIGHT_LED_MAP {2, 0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16} // Left to Right to Under
|
||||
|
@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define QUICK_TAP_TERM 0
|
||||
#define TAPPING_TERM 100
|
||||
|
||||
#undef RGBLED_NUM
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLED_NUM 12
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
@ -116,7 +116,7 @@ animation_status_t animation_status = {};
|
||||
#endif
|
||||
|
||||
#ifndef LED_ARRAY
|
||||
rgb_led_t led[RGBLED_NUM];
|
||||
rgb_led_t led[RGBLIGHT_LED_COUNT];
|
||||
# define LED_ARRAY led
|
||||
#endif
|
||||
|
||||
@ -126,7 +126,7 @@ rgblight_segment_t const *const *rgblight_layers = NULL;
|
||||
static bool deferred_set_layer_state = false;
|
||||
#endif
|
||||
|
||||
rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM};
|
||||
rgblight_ranges_t rgblight_ranges = {0, RGBLIGHT_LED_COUNT, 0, RGBLIGHT_LED_COUNT, RGBLIGHT_LED_COUNT};
|
||||
|
||||
void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
|
||||
rgblight_ranges.clipping_start_pos = start_pos;
|
||||
@ -134,8 +134,8 @@ void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) {
|
||||
}
|
||||
|
||||
void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) {
|
||||
if (start_pos >= RGBLED_NUM) return;
|
||||
if (start_pos + num_leds > RGBLED_NUM) return;
|
||||
if (start_pos >= RGBLIGHT_LED_COUNT) return;
|
||||
if (start_pos + num_leds > RGBLIGHT_LED_COUNT) return;
|
||||
rgblight_ranges.effect_start_pos = start_pos;
|
||||
rgblight_ranges.effect_end_pos = start_pos + num_leds;
|
||||
rgblight_ranges.effect_num_leds = num_leds;
|
||||
@ -664,7 +664,7 @@ void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) {
|
||||
}
|
||||
|
||||
void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) {
|
||||
if (!rgblight_config.enable || index >= RGBLED_NUM) {
|
||||
if (!rgblight_config.enable || index >= RGBLIGHT_LED_COUNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_
|
||||
#endif
|
||||
|
||||
void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) {
|
||||
if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) {
|
||||
if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLIGHT_LED_COUNT) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -727,19 +727,19 @@ void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start,
|
||||
|
||||
#ifndef RGBLIGHT_SPLIT
|
||||
void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) {
|
||||
rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2);
|
||||
rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLIGHT_LED_COUNT / 2);
|
||||
}
|
||||
|
||||
void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) {
|
||||
rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM);
|
||||
rgblight_setrgb_range(r, g, b, (uint8_t)RGBLIGHT_LED_COUNT / 2, (uint8_t)RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
|
||||
void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) {
|
||||
rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2);
|
||||
rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLIGHT_LED_COUNT / 2);
|
||||
}
|
||||
|
||||
void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) {
|
||||
rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM);
|
||||
rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLIGHT_LED_COUNT / 2, (uint8_t)RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
#endif // ifndef RGBLIGHT_SPLIT
|
||||
|
||||
@ -789,7 +789,7 @@ static void rgblight_layers_write(void) {
|
||||
break; // No more segments
|
||||
}
|
||||
// Write segment.count LEDs
|
||||
rgb_led_t *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)];
|
||||
rgb_led_t *const limit = &led[MIN(segment.index + segment.count, RGBLIGHT_LED_COUNT)];
|
||||
for (rgb_led_t *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) {
|
||||
# ifdef RGBLIGHT_LAYERS_RETAIN_VAL
|
||||
sethsv(segment.hue, segment.sat, current_val, led_ptr);
|
||||
@ -928,8 +928,8 @@ void rgblight_set(void) {
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_LED_MAP
|
||||
rgb_led_t led0[RGBLED_NUM];
|
||||
for (uint8_t i = 0; i < RGBLED_NUM; i++) {
|
||||
rgb_led_t led0[RGBLIGHT_LED_COUNT];
|
||||
for (uint8_t i = 0; i < RGBLIGHT_LED_COUNT; i++) {
|
||||
led0[i] = led[pgm_read_byte(&led_map[i])];
|
||||
}
|
||||
start_led = led0 + rgblight_ranges.clipping_start_pos;
|
||||
@ -1272,8 +1272,8 @@ void rgblight_effect_snake(animation_status_t *anim) {
|
||||
# endif
|
||||
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
|
||||
k = pos + j * increment;
|
||||
if (k > RGBLED_NUM) {
|
||||
k = k % (RGBLED_NUM);
|
||||
if (k > RGBLIGHT_LED_COUNT) {
|
||||
k = k % (RGBLIGHT_LED_COUNT);
|
||||
}
|
||||
if (k < 0) {
|
||||
k = k + rgblight_ranges.effect_num_leds;
|
||||
@ -1458,7 +1458,7 @@ typedef struct PACKED {
|
||||
uint8_t max_life;
|
||||
} TwinkleState;
|
||||
|
||||
static TwinkleState led_twinkle_state[RGBLED_NUM];
|
||||
static TwinkleState led_twinkle_state[RGBLIGHT_LED_COUNT];
|
||||
|
||||
void rgblight_effect_twinkle(animation_status_t *anim) {
|
||||
const bool random_color = anim->delta / 3;
|
||||
|
@ -16,6 +16,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// DEPRECATED DEFINES - DO NOT USE
|
||||
#if defined(RGBLED_NUM)
|
||||
# define RGBLIGHT_LED_COUNT RGBLED_NUM
|
||||
#endif
|
||||
// ========
|
||||
|
||||
/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) ****
|
||||
|
||||
old mode number (before 0.6.117) to new mode name table
|
||||
@ -234,7 +240,7 @@ void rgblight_unblink_all_but_layer(uint8_t layer);
|
||||
|
||||
#endif
|
||||
|
||||
extern rgb_led_t led[RGBLED_NUM];
|
||||
extern rgb_led_t led[RGBLIGHT_LED_COUNT];
|
||||
|
||||
extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
|
||||
extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user