From 26ea090190b815862f108903e5f41f20c6d16d66 Mon Sep 17 00:00:00 2001 From: Daniil Yastremskiy Date: Mon, 9 Aug 2021 21:32:35 +0300 Subject: [PATCH] Limit RGB max brightness on KPrepublic BM-series keyboards (#13132) --- keyboards/bm40hsrgb/config.h | 4 +++- keyboards/bm43a/config.h | 5 ++++- keyboards/bm60poker/config.h | 5 ++++- keyboards/bm60rgb/config.h | 8 ++++++-- keyboards/bm60rgb_iso/config.h | 9 ++++++--- keyboards/bm68rgb/config.h | 8 ++++++-- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h index 167a5667a4..dd66d3b396 100755 --- a/keyboards/bm40hsrgb/config.h +++ b/keyboards/bm40hsrgb/config.h @@ -48,8 +48,10 @@ #define RGB_DI_PIN E2 #define DRIVER_LED_TOTAL 53 #ifdef RGB_DI_PIN - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value #endif #ifndef RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value #endif diff --git a/keyboards/bm43a/config.h b/keyboards/bm43a/config.h index 2ab84781b4..e08561d916 100644 --- a/keyboards/bm43a/config.h +++ b/keyboards/bm43a/config.h @@ -55,7 +55,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ #define RGBLIGHT_ANIMATIONS @@ -70,3 +70,6 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +#endif diff --git a/keyboards/bm60poker/config.h b/keyboards/bm60poker/config.h index 4fbec4f9bd..831a1a1b8c 100644 --- a/keyboards/bm60poker/config.h +++ b/keyboards/bm60poker/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 5 /* The maximum brightness level */ + #define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ #define RGBLIGHT_ANIMATIONS @@ -68,3 +68,6 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +#endif diff --git a/keyboards/bm60rgb/config.h b/keyboards/bm60rgb/config.h index 3eee00e51e..bbb38e24fd 100644 --- a/keyboards/bm60rgb/config.h +++ b/keyboards/bm60rgb/config.h @@ -50,8 +50,12 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #define DRIVER_LED_TOTAL 69 #ifdef RGB_DI_PIN - #define RGBLED_NUM 69 - #define RGB_MATRIX_KEYPRESSES +# define RGBLED_NUM 69 +# define RGB_MATRIX_KEYPRESSES +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value #endif // generated by KBFirmware JSON to QMK Parser diff --git a/keyboards/bm60rgb_iso/config.h b/keyboards/bm60rgb_iso/config.h index 61d30cd83c..17cf1436d4 100644 --- a/keyboards/bm60rgb_iso/config.h +++ b/keyboards/bm60rgb_iso/config.h @@ -50,12 +50,12 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #define DRIVER_LED_TOTAL 70 #ifdef RGB_DI_PIN - #define RGBLED_NUM 70 - #define RGB_MATRIX_KEYPRESSES +# define RGBLED_NUM 70 +# define RGB_MATRIX_KEYPRESSES // #define RGBLIGHT_HUE_STEP 8 // #define RGBLIGHT_SAT_STEP 8 // #define RGBLIGHT_VAL_STEP 8 - // #define RGBLIGHT_LIMIT_VAL 180 /* The maximum brightness level */ +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ /*== all animations enable ==*/ // #define RGBLIGHT_ANIMATIONS @@ -70,3 +70,6 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +#endif diff --git a/keyboards/bm68rgb/config.h b/keyboards/bm68rgb/config.h index 1923192e5f..48844c295f 100644 --- a/keyboards/bm68rgb/config.h +++ b/keyboards/bm68rgb/config.h @@ -56,8 +56,12 @@ along with this program. If not, see . // The number of LEDs connected #define DRIVER_LED_TOTAL 74 #ifdef RGB_DI_PIN - #define RGBLED_NUM 74 - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLED_NUM 74 +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */