From c8fdf3731a1c9b4b8557cb77174b0c66851e4200 Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Thu, 20 Jul 2023 22:36:47 +0200 Subject: [PATCH] upgrade to FastLED 3.6.0 changes from 3.50 to 3.6.0: * bugfixes * removed "register" keyword * some speedups * explicit bool() and uint32_t() operators, see https://github.com/FastLED/FastLED/issues/819 FX.cpp: bugfix for "wled00/FX.cpp:4906:36: error: cannot convert 'CRGB' to 'uint32_t' {aka 'unsigned int'} in initialization" --- platformio.ini | 4 ++-- wled00/FX.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platformio.ini b/platformio.ini index abba37bd..73da6250 100644 --- a/platformio.ini +++ b/platformio.ini @@ -175,7 +175,7 @@ upload_speed = 115200 # ------------------------------------------------------------------------------ lib_compat_mode = strict lib_deps = - fastled/FastLED @ 3.5.0 + fastled/FastLED @ 3.6.0 IRremoteESP8266 @ 2.8.2 makuna/NeoPixelBus @ 2.7.5 https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7 @@ -201,7 +201,7 @@ build_flags = -DESP8266 -DFP_IN_IROM ;-Wno-deprecated-declarations - -Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C + ;-Wno-register ;; leaves some warnings when compiling C files: command-line option '-Wno-register' is valid for C++/ObjC++ but not for C ;-Dregister= # remove warnings in C++17 due to use of deprecated register keyword by the FastLED library ;; warning: this can be dangerous -Wno-misleading-indentation ; NONOSDK22x_190703 = 2.2.2-dev(38a443e) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index b457e094..9ed56710 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -4903,7 +4903,7 @@ uint16_t mode_2Dgameoflife(void) { // Written by Ewoud Wijma, inspired by https: } // i,j // Rules of Life - uint32_t col = prevLeds[XY(x,y)]; + uint32_t col = uint32_t(prevLeds[XY(x,y)]) & 0x00FFFFFF; // uint32_t operator returns RGBA, we want RGBW -> cut off "alpha" byte uint32_t bgc = RGBW32(backgroundColor.r, backgroundColor.g, backgroundColor.b, 0); if ((col != bgc) && (neighbors < 2)) SEGMENT.setPixelColorXY(x,y, bgc); // Loneliness else if ((col != bgc) && (neighbors > 3)) SEGMENT.setPixelColorXY(x,y, bgc); // Overpopulation