> 2), MAX_RIPPLES); // 56 max for 16 segment ESP8266
uint16_t dataSize = sizeof(ripple) * maxRipples;
+ const uint16_t cols = strip.isMatrix ? SEGMENT.virtualWidth() : 1;
+ const uint16_t rows = strip.isMatrix ? SEGMENT.virtualHeight() : SEGMENT.virtualLength();
+ const int16_t maxDim = max(2, (cols + rows) / 4); // WLEDMM
+ #if defined(ARDUINO_ARCH_ESP32)
+ random16_add_entropy(esp_random() & 0xFFFF); // improve randomness (esp32)
+ #endif
+
if (!SEGENV.allocateData(dataSize)) return mode_static(); //allocation failed
if (SEGENV.call == 0) {SEGENV.setUpLeds(); SEGMENT.fill(BLACK);} // WLEDMM use lossless getPixelColor()
@@ -2638,7 +2648,9 @@ uint16_t ripple_base()
uint16_t cx = rippleorigin >> 8;
uint16_t cy = rippleorigin & 0xFF;
uint8_t mag = scale8(sin8_t((propF>>2)), amp);
- if (propI > 0) SEGMENT.drawCircle(cx, cy, propI, color_blend(SEGMENT.getPixelColorXY(cx + propI, cy), col, mag), true);
+ propI = min(propI, maxDim); // WLEDMM make sure that circles are visible
+ if ((propI > 0) && (unsigned(cx + propI) < cols) && (unsigned(cy) < rows)) // WLEDMM
+ SEGMENT.drawCircle(cx, cy, propI, color_blend(SEGMENT.getPixelColorXY(cx + propI, cy), col, mag), true);
} else
#endif
{
@@ -3687,6 +3699,9 @@ uint16_t mode_exploding_fireworks(void)
float gravity = -0.0004f - (SEGMENT.speed/800000.0f); // m/s/s
gravity *= rows;
+#if defined(ARDUINO_ARCH_ESP32)
+ random16_add_entropy(esp_random() & 0xFFFF); // improves randonmess
+#endif
if (SEGENV.aux0 < 2) { //FLARE
if (SEGENV.aux0 == 0) { //init flare
@@ -3708,7 +3723,7 @@ uint16_t mode_exploding_fireworks(void)
flare->pos += flare->vel;
flare->posX += flare->velX;
flare->pos = constrain(flare->pos, 0, rows-1);
- flare->posX = constrain(flare->posX, 0, cols-strip.isMatrix);
+ flare->posX = constrain(flare->posX, 0, cols-int(strip.isMatrix));
flare->vel += gravity;
flare->col -= 2;
} else {
@@ -3738,10 +3753,10 @@ uint16_t mode_exploding_fireworks(void)
sparks[i].colIndex = random8();
sparks[i].vel *= flare->pos/rows; // proportional to height
sparks[i].velX *= strip.isMatrix ? flare->posX/cols : 0; // proportional to width
- sparks[i].vel *= -gravity *50;
+ sparks[i].vel *= -gravity *50.0f;
}
//sparks[1].col = 345; // this will be our known spark
- *dying_gravity = gravity/2;
+ *dying_gravity = gravity/2.0f;
SEGENV.aux0 = 3;
}
diff --git a/wled00/FX.h b/wled00/FX.h
index 5e8ae60acd..e09246953a 100644
--- a/wled00/FX.h
+++ b/wled00/FX.h
@@ -94,7 +94,7 @@ bool strip_uses_global_leds(void) __attribute__((pure)); // WLEDMM implemented
#define SEGCOLOR(x) strip.segColor(x) /* saves us a few kbytes of code */
#define SEGPALETTE Segment::getCurrentPalette()
#define SEGLEN strip._virtualSegmentLength /* saves us a few kbytes of code */
-#define SPEED_FORMULA_L (5U + (50U*(255U - SEGMENT.speed))/SEGLEN)
+#define SPEED_FORMULA_L (4U + (50U*(255U - SEGMENT.speed))/min(SEGLEN, uint16_t(512))) // WLEDMM limiting the formula to 512 virtual pixels
// some common colors
#define RED (uint32_t)0xFF0000
From 636dd2afa8fa4e5229d68993cf1dfc19b3f9bd57 Mon Sep 17 00:00:00 2001
From: Frank <91616163+softhack007@users.noreply.github.com>
Date: Thu, 12 Dec 2024 17:35:32 +0100
Subject: [PATCH 49/72] Fix CI builds by explicitly requiring ubuntu-22.04
---
.github/workflows/wled-ci.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/wled-ci.yml b/.github/workflows/wled-ci.yml
index d311af4ac0..8a44db719d 100644
--- a/.github/workflows/wled-ci.yml
+++ b/.github/workflows/wled-ci.yml
@@ -6,7 +6,7 @@ jobs:
get_default_envs:
name: Gather Environments
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Cache pip
@@ -31,7 +31,7 @@ jobs:
build:
name: Builds
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
needs: get_default_envs
strategy:
fail-fast: false
@@ -74,7 +74,7 @@ jobs:
path: build_output/release/*.bin
release:
name: Create Release
- runs-on: ubuntu-latest
+ runs-on: ubuntu-22.04
needs: [get_default_envs, build]
if: startsWith(github.ref, 'refs/tags/')
steps:
From 37d0086aadb761d3de7cd71de86721e2292760dd Mon Sep 17 00:00:00 2001
From: Frank <91616163+softhack007@users.noreply.github.com>
Date: Thu, 12 Dec 2024 17:38:25 +0100
Subject: [PATCH 50/72] tiny change to test CI builds
---
readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/readme.md b/readme.md
index 83c488e4b4..a44a82b3ae 100644
--- a/readme.md
+++ b/readme.md
@@ -14,7 +14,7 @@
-MoonModules/WLED is a fork from [Aircoookie/WLED](https://github.com/Aircoookie/WLED) which contains latest merge of v0.14 of WLED with [additional features](https://mm.kno.wled.ge/moonmodules/what-is-moonmodules/).
+MoonModules/WLED is a fork of [Aircoookie/WLED](https://github.com/Aircoookie/WLED) which contains latest merge of v0.14 of WLED with [additional features](https://mm.kno.wled.ge/moonmodules/what-is-moonmodules/).
This fork is created by members of the [Atuline/WLED](https://github.com/atuline/WLED) team to make development against v0.14 possible while still preserving [Atuline/WLED v0.13.x](https://github.com/atuline/WLED/tree/dev) as a stable and supported version. The Atuline/WLED fork is also called WLED SR (Sound Reactive).
From a37e20560dfd120db5d2d8b7645197f1eb6c5f79 Mon Sep 17 00:00:00 2001
From: Frank <91616163+softhack007@users.noreply.github.com>
Date: Fri, 13 Dec 2024 13:16:39 +0100
Subject: [PATCH 51/72] minor HTML and CSS fixes
* duplicate use of ID "heart"
* "& " --> "& "
* missed changes in simple UI
---
wled00/data/index.css | 6 ++++++
wled00/data/index.htm | 2 +-
wled00/data/index.js | 1 +
wled00/data/settings.htm | 4 ++--
wled00/data/settings_leds.htm | 2 +-
wled00/data/settings_wifi.htm | 4 ++--
wled00/data/simple.css | 6 ++++++
wled00/data/simple.htm | 1 +
wled00/data/simple.js | 7 ++++---
9 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/wled00/data/index.css b/wled00/data/index.css
index 617f971bd0..deb0cc64e7 100644
--- a/wled00/data/index.css
+++ b/wled00/data/index.css
@@ -665,6 +665,12 @@ button {
color: #f00;
}
+#heartMM {
+ transition: color 0.9s;
+ font-size: 16px;
+ color: #0f0;
+}
+
img {
max-width: 100%;
max-height: 100%;
diff --git a/wled00/data/index.htm b/wled00/data/index.htm
index e0c9ca547c..57fca4cf8e 100644
--- a/wled00/data/index.htm
+++ b/wled00/data/index.htm
@@ -389,7 +389,7 @@
WLED made with ❤︎ by Aircoookie and the WLED community
- WLED MM made with ❤︎ by Softhack007 & Ewowi and the WLED 2D & Audio Dev community
+ WLED MM made with ❤︎ by Softhack007 & Ewowi and the WLED 2D & Audio Dev community
diff --git a/wled00/data/index.js b/wled00/data/index.js
index fb183d820d..a89958f575 100644
--- a/wled00/data/index.js
+++ b/wled00/data/index.js
@@ -3216,6 +3216,7 @@ setInterval(()=>{
if (hc==144) hc+=36;
if (hc==108) hc+=18;
gId('heart').style.color = `hsl(${hc}, 100%, 50%)`;
+ gId('heartMM').style.color = `hsl(${hc}, 100%, 50%)`;
}, 910);
function openGH() { window.open("https://github.com/Aircoookie/WLED/wiki"); }
diff --git a/wled00/data/settings.htm b/wled00/data/settings.htm
index e52d3bd745..9e22466495 100644
--- a/wled00/data/settings.htm
+++ b/wled00/data/settings.htm
@@ -102,8 +102,8 @@
-
-
+
+