mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-12 03:44:19 +00:00
removed comments, clang-format, updated docs
This commit is contained in:
parent
adac1eef53
commit
5319700afd
@ -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 |
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user