diff options
| author | Fabien Fellay <33905146+FabienFellay@users.noreply.github.com> | 2024-01-30 04:56:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-30 14:56:32 +1100 |
| commit | 734c7afa7d142e9d052d067615540d067ed4fdcf (patch) | |
| tree | 078d781562da6637d08211217606c7ca3a7202b3 | |
| parent | ca7b2d63a79271d2a8b1e4759125e35f69da284b (diff) | |
Add missing rgb matrix default parameters (#22281)
| -rw-r--r-- | docs/feature_led_matrix.md | 1 | ||||
| -rw-r--r-- | docs/feature_rgb_matrix.md | 3 | ||||
| -rw-r--r-- | quantum/led_matrix/led_matrix.c | 2 | ||||
| -rw-r--r-- | quantum/led_matrix/led_matrix.h | 4 | ||||
| -rw-r--r-- | quantum/rgb_matrix/rgb_matrix.c | 2 | ||||
| -rw-r--r-- | quantum/rgb_matrix/rgb_matrix.h | 4 |
6 files changed, 13 insertions, 3 deletions
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index 080a693d18..6cb173face 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md | |||
| @@ -365,6 +365,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_ | |||
| 365 | #define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set | 365 | #define LED_MATRIX_DEFAULT_MODE LED_MATRIX_SOLID // Sets the default mode, if none has been set |
| 366 | #define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set | 366 | #define LED_MATRIX_DEFAULT_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set |
| 367 | #define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set | 367 | #define LED_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set |
| 368 | #define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set | ||
| 368 | #define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. | 369 | #define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. |
| 369 | // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR | 370 | // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR |
| 370 | ``` | 371 | ``` |
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 5a67f64c1b..25c924b9c9 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
| @@ -873,12 +873,13 @@ These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master | |||
| 873 | #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) | 873 | #define RGB_MATRIX_LED_PROCESS_LIMIT (RGB_MATRIX_LED_COUNT + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) |
| 874 | #define RGB_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) | 874 | #define RGB_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) |
| 875 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | 875 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 |
| 876 | #define RGB_MATRIX_DEFAULT_ON true // Sets the default enabled state, if none has been set | ||
| 876 | #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set | 877 | #define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set |
| 877 | #define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set | 878 | #define RGB_MATRIX_DEFAULT_HUE 0 // Sets the default hue value, if none has been set |
| 878 | #define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set | 879 | #define RGB_MATRIX_DEFAULT_SAT 255 // Sets the default saturation value, if none has been set |
| 879 | #define RGB_MATRIX_DEFAULT_ON true // Sets the default enabled state, if none has been set | ||
| 880 | #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set | 880 | #define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set |
| 881 | #define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set | 881 | #define RGB_MATRIX_DEFAULT_SPD 127 // Sets the default animation speed, if none has been set |
| 882 | #define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set | ||
| 882 | #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) | 883 | #define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature) |
| 883 | #define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. | 884 | #define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right. |
| 884 | // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR | 885 | // If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR |
diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 760a8b7484..c0fb4c810b 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c | |||
| @@ -98,7 +98,7 @@ void eeconfig_update_led_matrix_default(void) { | |||
| 98 | led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE; | 98 | led_matrix_eeconfig.mode = LED_MATRIX_DEFAULT_MODE; |
| 99 | led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL; | 99 | led_matrix_eeconfig.val = LED_MATRIX_DEFAULT_VAL; |
| 100 | led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD; | 100 | led_matrix_eeconfig.speed = LED_MATRIX_DEFAULT_SPD; |
| 101 | led_matrix_eeconfig.flags = LED_FLAG_ALL; | 101 | led_matrix_eeconfig.flags = LED_MATRIX_DEFAULT_FLAGS; |
| 102 | eeconfig_flush_led_matrix(true); | 102 | eeconfig_flush_led_matrix(true); |
| 103 | } | 103 | } |
| 104 | 104 | ||
diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index eeaeee20b5..941d42aeca 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h | |||
| @@ -58,6 +58,10 @@ | |||
| 58 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | 58 | # define LED_MATRIX_DEFAULT_SPD UINT8_MAX / 2 |
| 59 | #endif | 59 | #endif |
| 60 | 60 | ||
| 61 | #ifndef LED_MATRIX_DEFAULT_FLAGS | ||
| 62 | # define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL | ||
| 63 | #endif | ||
| 64 | |||
| 61 | #ifndef LED_MATRIX_LED_FLUSH_LIMIT | 65 | #ifndef LED_MATRIX_LED_FLUSH_LIMIT |
| 62 | # define LED_MATRIX_LED_FLUSH_LIMIT 16 | 66 | # define LED_MATRIX_LED_FLUSH_LIMIT 16 |
| 63 | #endif | 67 | #endif |
diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 4865664ac0..655aca1867 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c | |||
| @@ -100,7 +100,7 @@ void eeconfig_update_rgb_matrix_default(void) { | |||
| 100 | rgb_matrix_config.mode = RGB_MATRIX_DEFAULT_MODE; | 100 | rgb_matrix_config.mode = RGB_MATRIX_DEFAULT_MODE; |
| 101 | rgb_matrix_config.hsv = (HSV){RGB_MATRIX_DEFAULT_HUE, RGB_MATRIX_DEFAULT_SAT, RGB_MATRIX_DEFAULT_VAL}; | 101 | rgb_matrix_config.hsv = (HSV){RGB_MATRIX_DEFAULT_HUE, RGB_MATRIX_DEFAULT_SAT, RGB_MATRIX_DEFAULT_VAL}; |
| 102 | rgb_matrix_config.speed = RGB_MATRIX_DEFAULT_SPD; | 102 | rgb_matrix_config.speed = RGB_MATRIX_DEFAULT_SPD; |
| 103 | rgb_matrix_config.flags = LED_FLAG_ALL; | 103 | rgb_matrix_config.flags = RGB_MATRIX_DEFAULT_FLAGS; |
| 104 | eeconfig_flush_rgb_matrix(true); | 104 | eeconfig_flush_rgb_matrix(true); |
| 105 | } | 105 | } |
| 106 | 106 | ||
diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index b1bf839bf6..f8a6845e02 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h | |||
| @@ -78,6 +78,10 @@ | |||
| 78 | # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 | 78 | # define RGB_MATRIX_DEFAULT_SPD UINT8_MAX / 2 |
| 79 | #endif | 79 | #endif |
| 80 | 80 | ||
| 81 | #ifndef RGB_MATRIX_DEFAULT_FLAGS | ||
| 82 | # define RGB_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL | ||
| 83 | #endif | ||
| 84 | |||
| 81 | #ifndef RGB_MATRIX_LED_FLUSH_LIMIT | 85 | #ifndef RGB_MATRIX_LED_FLUSH_LIMIT |
| 82 | # define RGB_MATRIX_LED_FLUSH_LIMIT 16 | 86 | # define RGB_MATRIX_LED_FLUSH_LIMIT 16 |
| 83 | #endif | 87 | #endif |
