Fix CI properly

Small 2D Soap FX optimizations
pull/3091/head
cschwinne 2023-04-28 00:51:34 +02:00
rodzic 9ff3f85432
commit 4d55e05b07
2 zmienionych plików z 9 dodań i 14 usunięć

Wyświetl plik

@ -10,10 +10,10 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# CI binaries # 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 # 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 # 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 ; 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

Wyświetl plik

@ -7382,7 +7382,7 @@ uint16_t mode_2Ddistortionwaves() {
return FRAMETIME; 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 //Soap
//@Stepko //@Stepko
@ -7442,7 +7442,6 @@ uint16_t mode_2Dsoap() {
int amplitude; int amplitude;
int8_t shiftX = 0; //(SEGMENT.custom1 - 128) / 4; int8_t shiftX = 0; //(SEGMENT.custom1 - 128) / 4;
int8_t shiftY = 0; //(SEGMENT.custom2 - 128) / 4; int8_t shiftY = 0; //(SEGMENT.custom2 - 128) / 4;
CRGB ledsbuff[cols+rows];
amplitude = (cols >= 16) ? (cols-8)/8 : 1; amplitude = (cols >= 16) ? (cols-8)/8 : 1;
for (int y = 0; y < rows; y++) { for (int y = 0; y < rows; y++) {
@ -7463,10 +7462,8 @@ uint16_t mode_2Dsoap() {
CRGB PixelB = CRGB::Black; CRGB PixelB = CRGB::Black;
if ((zF >= 0) && (zF < cols)) PixelB = SEGMENT.getPixelColorXY(zF, y); if ((zF >= 0) && (zF < cols)) PixelB = SEGMENT.getPixelColorXY(zF, y);
else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[(abs(zF)%cols)*cols + y]*3); else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[(abs(zF)%cols)*cols + y]*3);
ledsbuff[x] = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); CRGB pix = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction)));
} SEGMENT.setPixelColorXY(x, y, pix);
for (size_t x = 0; x < cols; x++) {
SEGMENT.setPixelColorXY(x, y, ledsbuff[x]);
} }
} }
@ -7475,7 +7472,7 @@ uint16_t mode_2Dsoap() {
int amount = ((int)noise3d[x*cols] - 128) * 2 * amplitude + 256*shiftY; int amount = ((int)noise3d[x*cols] - 128) * 2 * amplitude + 256*shiftY;
int delta = abs(amount) >> 8; int delta = abs(amount) >> 8;
int fraction = abs(amount) & 255; int fraction = abs(amount) & 255;
for (size_t y = 0; y < rows; y++) { for (int y = 0; y < rows; y++) {
if (amount < 0) { if (amount < 0) {
zD = y - delta; zD = y - delta;
zF = zD - 1; zF = zD - 1;
@ -7489,16 +7486,14 @@ uint16_t mode_2Dsoap() {
CRGB PixelB = CRGB::Black; CRGB PixelB = CRGB::Black;
if ((zF >= 0) && (zF < rows)) PixelB = SEGMENT.getPixelColorXY(x, zF); if ((zF >= 0) && (zF < rows)) PixelB = SEGMENT.getPixelColorXY(x, zF);
else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[x*cols + abs(zF)%rows]*3); else PixelB = ColorFromPalette(SEGPALETTE, ~noise3d[x*cols + abs(zF)%rows]*3);
ledsbuff[y] = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction))); CRGB pix = (PixelA.nscale8(ease8InOutApprox(255 - fraction))) + (PixelB.nscale8(ease8InOutApprox(fraction)));
} SEGMENT.setPixelColorXY(x, y, pix);
for (int y = 0; y < rows; y++) {
SEGMENT.setPixelColorXY(x, y, ledsbuff[y]);
} }
} }
return FRAMETIME; 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 #endif // WLED_DISABLE_2D