Change LED_MATRIX_STARTUP_* defines to LED_MATRIX_DEFAULT_* (#19080)

This commit is contained in:
Ryan 2022-11-27 03:14:35 +11:00 committed by GitHub
parent 2582992381
commit a5a20cc792
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 18 deletions

View File

@ -369,9 +369,9 @@ For inspiration and examples, check out the built-in effects under `quantum/led_
#define LED_MATRIX_LED_PROCESS_LIMIT (LED_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
#define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
#define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs
#define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
#define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define LED_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
#define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set
#define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If LED_MATRIX_KEYPRESSES or LED_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
```

View File

@ -117,10 +117,10 @@ void matrix_init_kb(void) {
* Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
* and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
*/
# if !defined(LED_MATRIX_STARTUP_SPD)
# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
# if !defined(LED_MATRIX_DEFAULT_SPD)
# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
# endif
led_matrix_set_speed(LED_MATRIX_STARTUP_SPD);
led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD);
led_matrix_set_flags(LED_FLAG_ALL);
#endif

View File

@ -83,10 +83,10 @@ void matrix_init_kb(void) {
* Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c),
* and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot.
*/
# if !defined(LED_MATRIX_STARTUP_SPD)
# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
# if !defined(LED_MATRIX_DEFAULT_SPD)
# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
# endif
led_matrix_set_speed(LED_MATRIX_STARTUP_SPD),
led_matrix_set_speed(LED_MATRIX_DEFAULT_SPD),
led_matrix_set_flags(LED_FLAG_ALL);
#endif

View File

@ -71,16 +71,16 @@ const led_point_t k_led_matrix_center = LED_MATRIX_CENTER;
# define LED_MATRIX_SPD_STEP 16
#endif
#if !defined(LED_MATRIX_STARTUP_MODE)
# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID
#if !defined(LED_MATRIX_DEFAULT_MODE)
# define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID
#endif
#if !defined(LED_MATRIX_STARTUP_VAL)
# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
#if !defined(LED_MATRIX_DEFAULT_VAL)
# define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS
#endif
#if !defined(LED_MATRIX_STARTUP_SPD)
# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2
#if !defined(LED_MATRIX_DEFAULT_SPD)
# define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2
#endif
// globals
@ -123,9 +123,9 @@ void eeconfig_update_led_matrix(void) {
void eeconfig_update_led_matrix_default(void) {
dprintf("eeconfig_update_led_matrix_default\n");
led_matrix_eeconfig.enable = 1;
led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE;
led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL;
led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD;
led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE;
led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL;
led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD;
led_matrix_eeconfig.flags = LED_FLAG_ALL;
eeconfig_flush_led_matrix(true);
}