Update quantum/rgb_matrix/animations/starlight_smooth_anim.h

Co-authored-by: フィルターペーパー <76888457+filterpaper@users.noreply.github.com>
This commit is contained in:
Drashna Jaelre 2024-10-15 07:10:19 -07:00 committed by GitHub
parent 708711c970
commit b88b761f67
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,13 +14,13 @@ bool STARLIGHT_SMOOTH(effect_params_t* params) {
}
for (uint8_t i = led_min; i < led_max; i++) {
HSV hsv = rgb_matrix_config.hsv;
RGB_MATRIX_TEST_LED_FLAGS();
uint16_t time = scale16by8((g_rgb_timer / 2) + time_offsets[i], rgb_matrix_config.speed / 16);
HSV hsv = rgb_matrix_config.hsv;
hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v);
RGB rgb = rgb_matrix_hsv_to_rgb(hsv);
RGB_MATRIX_TEST_LED_FLAGS();
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
}