From 5319700afd0c362d3f562da1173b64b185456cd3 Mon Sep 17 00:00:00 2001 From: hbbit-dev Date: Wed, 17 Jul 2024 18:21:53 -0700 Subject: [PATCH] removed comments, clang-format, updated docs --- docs/features/rgb_matrix.md | 1 + quantum/rgb_matrix/animations/starlight_smooth_anim.h | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md index aef766ebd24..230eff7a36d 100644 --- a/docs/features/rgb_matrix.md +++ b/docs/features/rgb_matrix.md @@ -720,6 +720,7 @@ You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `confi |`#define ENABLE_RGB_MATRIX_STARLIGHT` |Enables `RGB_MATRIX_STARLIGHT` | |`#define ENABLE_RGB_MATRIX_STARLIGHT_DUAL_HUE` |Enables `RGB_MATRIX_STARLIGHT_DUAL_HUE` | |`#define ENABLE_RGB_MATRIX_STARLIGHT_DUAL_SAT` |Enables `RGB_MATRIX_STARLIGHT_DUAL_SAT` | +|`#define ENABLE_RGB_MATRIX_STARLIGHT_SMOOTH` |Enables `RGB_MATRIX_STARLIGHT_SMOOTH` | |`#define ENABLE_RGB_MATRIX_RIVERFLOW` |Enables `RGB_MATRIX_RIVERFLOW` | |Framebuffer Defines |Description | diff --git a/quantum/rgb_matrix/animations/starlight_smooth_anim.h b/quantum/rgb_matrix/animations/starlight_smooth_anim.h index 81775214ade..5543bfc79d8 100644 --- a/quantum/rgb_matrix/animations/starlight_smooth_anim.h +++ b/quantum/rgb_matrix/animations/starlight_smooth_anim.h @@ -5,11 +5,9 @@ RGB_MATRIX_EFFECT(STAR_LIGHT_SMOOTH) bool STAR_LIGHT_SMOOTH(effect_params_t* params) { RGB_MATRIX_USE_LIMITS(led_min, led_max); - // initialize static array for random offsets static uint16_t time_offsets[RGB_MATRIX_LED_COUNT] = {0}; static bool initialized = false; - // initialize random offsets if (!initialized) { for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) { time_offsets[i] = rand() % 65500; @@ -20,7 +18,6 @@ bool STAR_LIGHT_SMOOTH(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { HSV hsv = rgb_matrix_config.hsv; - // adjustable time calculation uint16_t time = scale16by8((g_rgb_timer / 2) + time_offsets[i], rgb_matrix_config.speed / 16); hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);