summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorÁlvaro A. Volpato <alvaro.augusto.volpato@gmail.com>2023-09-29 10:53:12 -0300
committerGitHub <noreply@github.com>2023-09-29 14:53:12 +0100
commit2eed1f5bad453b11e9f2190239f9c43f4dde979d (patch)
treed0e4e3db544333bbe1b5d3aa412ebbc9ebd630b8 /quantum
parent67f52935e3d91f370c696700a479cec83fb46888 (diff)
Add `RGBLIGHT_DEFAULT_ON` macro configuration option (#20857)
* ADD RGB_DEFAULT_DISABLED option and updated documentation * Formatting * Add as by fauxpark's suggestion Co-authored by: fauxpark * Formatting * Use boolean values instead of numerical Co-authored-by: Ryan <fauxpark@gmail.com> * Edit documentation formatting Co-authored-by: Ryan <fauxpark@gmail.com> * Remove comment Co-authored-by: Ryan <fauxpark@gmail.com> * Set RGB mode to DEFAULT macro at init Co-authored-by: Ryan <fauxpark@gmail.com> --------- Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: zvecr <git@zvecr.com>
Diffstat (limited to 'quantum')
-rw-r--r--quantum/rgblight/rgblight.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c
index aea0ae44cb..8ac886d441 100644
--- a/quantum/rgblight/rgblight.c
+++ b/quantum/rgblight/rgblight.c
@@ -86,6 +86,10 @@ static uint8_t mode_base_table[] = {
# define RGBLIGHT_DEFAULT_SPD 0
#endif
+#if !defined(RGBLIGHT_DEFAULT_ON)
+# define RGBLIGHT_DEFAULT_ON true
+#endif
+
static inline int is_static_effect(uint8_t mode) {
return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL;
}
@@ -195,7 +199,7 @@ void eeconfig_update_rgblight_current(void) {
}
void eeconfig_update_rgblight_default(void) {
- rgblight_config.enable = 1;
+ rgblight_config.enable = RGBLIGHT_DEFAULT_ON;
rgblight_config.velocikey = 0;
rgblight_config.mode = RGBLIGHT_DEFAULT_MODE;
rgblight_config.hue = RGBLIGHT_DEFAULT_HUE;