From 0ebec95c1f8f49467182d9de1c27caea0c828ddb Mon Sep 17 00:00:00 2001 From: Ryotaro Onuki Date: Thu, 18 Oct 2018 14:03:36 +0900 Subject: [PATCH] fix an infinite loop in WS2812.cpp just a simple mistake --- cpp_utils/WS2812.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp_utils/WS2812.cpp b/cpp_utils/WS2812.cpp index 0b8a3cbe..af4bc512 100644 --- a/cpp_utils/WS2812.cpp +++ b/cpp_utils/WS2812.cpp @@ -158,7 +158,7 @@ void WS2812::show() { (getChannelValueByType(this->colorOrder[2], this->pixels[i])); ESP_LOGD(LOG_TAG, "Pixel value: %x", currentPixel); - for (uint8_t j = 23; j >= 0; j--) { + for (int8_t j = 23; j >= 0; j--) { // We have 24 bits of data representing the red, green amd blue channels. The value of the // 24 bits to output is in the variable current_pixel. We now need to stream this value // through RMT in most significant bit first. To do this, we iterate through each of the 24