connornishijima / SensoryBridge

OSHW Advanced LED Audio Visualizer based around a hacky Discrete Fourier Transform
GNU General Public License v3.0
78 stars 10 forks source link

init_leds() loop counter too small #20

Open bradanlane opened 11 months ago

bradanlane commented 11 months ago

In most cases, the loop counter variable is a uint16_t. However, near the end of init_leds() there is the following lines of code which use an uint8_t. This becomes an infinite loop when there are more than 255 LEDs.

for (uint8_t x = 0; x < CONFIG.LED_COUNT; x++) {
    leds_out[x] = CRGB(0, 0, 0);
  }