]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keyboard] Added configurable defaults for RGB backlight parameters. (#5549)
authorWilba <Jason.S.Williams@gmail.com>
Thu, 4 Apr 2019 14:10:07 +0000 (01:10 +1100)
committerDrashna Jaelre <drashna@live.com>
Thu, 4 Apr 2019 14:10:07 +0000 (07:10 -0700)
* Added configurable defaults for RGB backlight indicators.

* Added more configurable defaults

keyboards/hs60/v2/config.h
keyboards/rama/m60_a/config.h
keyboards/rama/m6_b/config.h
keyboards/zeal60/config.h
keyboards/zeal60/rgb_backlight.c
keyboards/zeal65/config.h

index bbf17251b4eadf7cbd3bf60cb2d18ce4826f30da..05255d13310466b82305693ca1ea31f4358d69fc 100644 (file)
@@ -102,9 +102,19 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 // disable backlight after timeout in minutes, 0 = no timeout
 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
 
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
 // the default effect (RGB test)
 #define RGB_BACKLIGHT_EFFECT 255
 
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
 #define DRIVER_COUNT 2
 #define DRIVER_LED_TOTAL 64
 
index 2b54cda790dbf89ea6be3021f3565b16ac04d25d..1cbdee5ae355262d1bd8e287550fad449b144313 100644 (file)
 // disable backlight after timeout in minutes, 0 = no timeout
 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
 
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
 // the default effect (RGB test)
 #define RGB_BACKLIGHT_EFFECT 255
 
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
 // These define which keys in the matrix are alphas/mods
 // Used for backlight effects so colors are different for
 // alphas vs. mods
 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001
 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111
 
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index c2a225d53aaffd8e4919e56eccd93abc0c9aaee4..0d690bffafc55bdba193bfc5eaece6d786a15b7b 100644 (file)
 // disable backlight after timeout in minutes, 0 = no timeout
 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
 
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
 // the default effect (RGB test)
 #define RGB_BACKLIGHT_EFFECT 255
 
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
 // These define which keys in the matrix are alphas/mods
 // Used for backlight effects so colors are different for
 // alphas vs. mods
 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0
 #define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0
 
+#define RGB_BACKLIGHT_CAPS_LOCK_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_1_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_2_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+#define RGB_BACKLIGHT_LAYER_3_INDICATOR { .color = { .h = 0, .s = 0 }, .index = 255 }
+
 #define DYNAMIC_KEYMAP_LAYER_COUNT 4
 
 // EEPROM usage
index 94cc9989b74af0fe3ab8cd1adcb0c80eceaadcb8..a5e41116dca44d180fb7b3a38dc3eee85df7b915 100644 (file)
 // disable backlight after timeout in minutes, 0 = no timeout
 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
 
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
 // the default effect (RGB test)
 #define RGB_BACKLIGHT_EFFECT 255
 
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
 // These define which keys in the matrix are alphas/mods
 // Used for backlight effects so colors are different for
 // alphas vs. mods
index 8d7a7fe8d10bf44e24f775cfb19a4f74e68138e3..d5f206fdcec9ddcea5d114f7dd182e44448cc6bc 100644 (file)
@@ -69,11 +69,11 @@ backlight_config g_config = {
        .disable_hhkb_blocker_leds = RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS,
        .disable_when_usb_suspended = RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED,
        .disable_after_timeout = RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT,
-       .brightness = 255,
+       .brightness = RGB_BACKLIGHT_BRIGHTNESS,
        .effect = RGB_BACKLIGHT_EFFECT,
-       .effect_speed = 0,
-       .color_1 = { .h = 0, .s = 255 },
-       .color_2 = { .h = 127, .s = 255 },
+       .effect_speed = RGB_BACKLIGHT_EFFECT_SPEED,
+       .color_1 = RGB_BACKLIGHT_COLOR_1,
+       .color_2 = RGB_BACKLIGHT_COLOR_2,
        .caps_lock_indicator = RGB_BACKLIGHT_CAPS_LOCK_INDICATOR,
        .layer_1_indicator = RGB_BACKLIGHT_LAYER_1_INDICATOR,
        .layer_2_indicator = RGB_BACKLIGHT_LAYER_2_INDICATOR,
index 896deac8b8be5d2c3355c5c90861b383dacf8308..224fce1f65b2ea48e7dfe7183376afc50e97676d 100644 (file)
 // disable backlight after timeout in minutes, 0 = no timeout
 #define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0
 
+// the default brightness
+#define RGB_BACKLIGHT_BRIGHTNESS 255
+
 // the default effect (RGB test)
 #define RGB_BACKLIGHT_EFFECT 255
 
+// the default effect speed (0-3)
+#define RGB_BACKLIGHT_EFFECT_SPEED 0
+
+// the default color1 and color2
+#define RGB_BACKLIGHT_COLOR_1 { .h = 0, .s = 255 }
+#define RGB_BACKLIGHT_COLOR_2 { .h = 127, .s = 255 }
+
 // These define which keys in the matrix are alphas/mods
 // Used for backlight effects so colors are different for
 // alphas vs. mods