From 3df6f286a63c9cf1a593cca81eaaebf86396673c Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Fri, 5 May 2023 13:32:35 +0200 Subject: [PATCH] game of life: minor change to stay compatible with newer FastLed versions added explicit conversion operator CRGB -> uint32_t --- wled00/FX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index acde24a9..dc0708a1 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -4922,7 +4922,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)]); // softhack007: explicit conversion added - needed with newer fastled releases 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