From f2f621befcc493cad6e7058a3e6d8d8ee9b9f7df Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:48:11 +0100 Subject: [PATCH] minor FX improvements Fire2012: better randomness Julia: avoid darkening when using "blur" --- wled00/FX.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index f44db9da23..c3a5c59564 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -2128,12 +2128,16 @@ uint16_t mode_fire_2012() { const uint8_t ignition = max(3,SEGLEN/10); // ignition area: 10% of segment length or minimum 3 pixels + #if defined(ARDUINO_ARCH_ESP32) + random16_add_entropy(esp_random() & 0xFFFF); // improves randonmess + #endif + // Step 1. Cool down every cell a little for (int i = 0; i < SEGLEN; i++) { uint8_t cool = (it != SEGENV.step) ? random8((((20 + SEGMENT.speed/3) * 16) / SEGLEN)+2) : random8(4); uint8_t minTemp = (ixcen = 0.; julias->ycen = 0.; julias->xymag = 1.0;