From 4d55e05b07ccacb44fdfae36c5306b5122749fb1 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Fri, 28 Apr 2023 00:51:34 +0200 Subject: [PATCH] Fix CI properly Small 2D Soap FX optimizations --- platformio.ini | 4 ++-- wled00/FX.cpp | 19 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/platformio.ini b/platformio.ini index dd797e38..0482809a 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,10 +10,10 @@ # ------------------------------------------------------------------------------ # CI binaries -ci_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth # ESP32 variant builds are temporarily excluded from CI due to toolchain issues on the GitHub Actions Linux environment +default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth # ESP32 variant builds are temporarily excluded from CI due to toolchain issues on the GitHub Actions Linux environment # Release binaries -default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB +; default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_8MB # Build everything ; default_envs = esp32dev, esp8285_4CH_MagicHome, codm-controller-0.6-rev2, codm-controller-0.6, esp32s2_saola, d1_mini_5CH_Shojo_PCB, d1_mini, sp501e, nodemcuv2, esp32_eth, anavi_miracle_controller, esp07, esp01_1m_full, m5atom, h803wf, d1_mini_ota, heltec_wifi_kit_8, esp8285_H801, d1_mini_debug, wemos_shield_esp32, elekstube_ips diff --git a/wled00/FX.cpp b/wled00/FX.cpp index cb454af0..c3f82ae3 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -7382,7 +7382,7 @@ uint16_t mode_2Ddistortionwaves() { return FRAMETIME; } -static const char _data_FX_MODE_2DDISTORTIONWAVES[] PROGMEM = "Distortion Waves@!,Scale;;;2;"; +static const char _data_FX_MODE_2DDISTORTIONWAVES[] PROGMEM = "Distortion Waves@!,Scale;;;2"; //Soap //@Stepko @@ -7442,7 +7442,6 @@ uint16_t mode_2Dsoap() { int amplitude; int8_t shiftX = 0; //(SEGMENT.custom1 - 128) / 4; int8_t shiftY = 0; //(SEGMENT.custom2 - 128) / 4; - CRGB ledsbuff[cols+rows]; amplitude = (cols >= 16) ? (cols-8)/8 : 1; for (int y = 0; y < rows; y++) { @@ -7463,10 +7462,8 @@ uint16_t mode_2Dsoap() { CRGB PixelB = CRGB::Black; if ((zF >= 0) && (zF < cols)) PixelB = SEGMENT.getPixelColorXY(zF, y); else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[(abs(zF)%cols)*cols + y]*3); - ledsbuff[x] = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); - } - for (size_t x = 0; x < cols; x++) { - SEGMENT.setPixelColorXY(x, y, ledsbuff[x]); + CRGB pix = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); + SEGMENT.setPixelColorXY(x, y, pix); } } @@ -7475,7 +7472,7 @@ uint16_t mode_2Dsoap() { int amount = ((int)noise3d[x*cols] - 128) * 2 * amplitude + 256*shiftY; int delta = abs(amount) >> 8; int fraction = abs(amount) & 255; - for (size_t y = 0; y < rows; y++) { + for (int y = 0; y < rows; y++) { if (amount < 0) { zD = y - delta; zF = zD - 1; @@ -7489,16 +7486,14 @@ uint16_t mode_2Dsoap() { CRGB PixelB = CRGB::Black; if ((zF >= 0) && (zF < rows)) PixelB = SEGMENT.getPixelColorXY(x, zF); else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[x*cols + abs(zF)%rows]*3); - ledsbuff[y] = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); - } - for (int y = 0; y < rows; y++) { - SEGMENT.setPixelColorXY(x, y, ledsbuff[y]); + CRGB pix = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); + SEGMENT.setPixelColorXY(x, y, pix); } } return FRAMETIME; } -static const char _data_FX_MODE_2DSOAP[] PROGMEM = "Soap@!,Smoothness;;!;2;pal=11"; +static const char _data_FX_MODE_2DSOAP[] PROGMEM = "Soap@!,Smoothness;;!;2"; #endif // WLED_DISABLE_2D