Skip to content

Commit

Permalink
Change LED_MATRIX_STARTUP_* defines to LED_MATRIX_DEFAULT_* (qmk#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fauxpark authored and crembz committed Dec 18, 2022
1 parent a4c34fa commit 03bf79d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions docs/feature_led_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
6 changes: 3 additions & 3 deletions keyboards/input_club/ergodox_infinity/ergodox_infinity.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions keyboards/input_club/whitefox/whitefox.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
18 changes: 9 additions & 9 deletions quantum/led_matrix/led_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 03bf79d

Please sign in to comment.