Browse Source

Refactor Starlight Smooth matrix effect (#25442)

フィルターペーパー 1 year ago
parent
commit
584ad807cc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      quantum/rgb_matrix/animations/starlight_smooth_anim.h

+ 1 - 1
quantum/rgb_matrix/animations/starlight_smooth_anim.h

@@ -9,7 +9,7 @@ static uint8_t phase_offsets[RGB_MATRIX_LED_COUNT];
 
 hsv_t STARLIGHT_SMOOTH_math(hsv_t hsv, uint8_t i, uint8_t time) {
     if (phase_offsets[i] == 0) {
-        phase_offsets[i] = rand() % 255;
+        phase_offsets[i] = random8();
     }
     hsv.v = scale8(abs8(sin8((time + phase_offsets[i]) / 2) - 128) * 2, hsv.v);
     return hsv;