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

Change LED_MATRIX_STARTUP_* defines to LED_MATRIX_DEFAULT_* #19080

Merged
merged 1 commit into from
Nov 26, 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
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