Skip to content

Commit 58086a8

Browse files
authored
Merge pull request #703 from kerikun11/master
fix an infinite loop in WS2812.cpp
2 parents 7222d19 + 0ebec95 commit 58086a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp_utils/WS2812.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void WS2812::show() {
158158
(getChannelValueByType(this->colorOrder[2], this->pixels[i]));
159159

160160
ESP_LOGD(LOG_TAG, "Pixel value: %x", currentPixel);
161-
for (uint8_t j = 23; j >= 0; j--) {
161+
for (int8_t j = 23; j >= 0; j--) {
162162
// We have 24 bits of data representing the red, green amd blue channels. The value of the
163163
// 24 bits to output is in the variable current_pixel. We now need to stream this value
164164
// through RMT in most significant bit first. To do this, we iterate through each of the 24

0 commit comments

Comments
 (0)