diff options
Diffstat (limited to 'quantum/rgb_matrix.c')
| -rw-r--r-- | quantum/rgb_matrix.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 8c41fc54d..b7424d637 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c | |||
| @@ -41,6 +41,10 @@ rgb_config_t rgb_matrix_config; | |||
| 41 | #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT | 41 | #define EECONFIG_RGB_MATRIX EECONFIG_RGBLIGHT |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > 255 | ||
| 45 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 | ||
| 46 | #endif | ||
| 47 | |||
| 44 | bool g_suspend_state = false; | 48 | bool g_suspend_state = false; |
| 45 | 49 | ||
| 46 | // Global tick at 20 Hz | 50 | // Global tick at 20 Hz |
| @@ -68,7 +72,7 @@ void eeconfig_update_rgb_matrix_default(void) { | |||
| 68 | rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; | 72 | rgb_matrix_config.mode = RGB_MATRIX_CYCLE_LEFT_RIGHT; |
| 69 | rgb_matrix_config.hue = 0; | 73 | rgb_matrix_config.hue = 0; |
| 70 | rgb_matrix_config.sat = 255; | 74 | rgb_matrix_config.sat = 255; |
| 71 | rgb_matrix_config.val = 255; | 75 | rgb_matrix_config.val = RGB_MATRIX_MAXIMUM_BRIGHTNESS; |
| 72 | rgb_matrix_config.speed = 0; | 76 | rgb_matrix_config.speed = 0; |
| 73 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 77 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 74 | } | 78 | } |
| @@ -858,12 +862,12 @@ void rgblight_decrease_sat(void) { | |||
| 858 | } | 862 | } |
| 859 | 863 | ||
| 860 | void rgblight_increase_val(void) { | 864 | void rgblight_increase_val(void) { |
| 861 | rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, 255 ); | 865 | rgb_matrix_config.val = increment( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); |
| 862 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 866 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 863 | } | 867 | } |
| 864 | 868 | ||
| 865 | void rgblight_decrease_val(void) { | 869 | void rgblight_decrease_val(void) { |
| 866 | rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, 255 ); | 870 | rgb_matrix_config.val = decrement( rgb_matrix_config.val, 8, 0, RGB_MATRIX_MAXIMUM_BRIGHTNESS ); |
| 867 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); | 871 | eeconfig_update_rgb_matrix(rgb_matrix_config.raw); |
| 868 | } | 872 | } |
| 869 | 873 | ||
