From 8013f8d5b35cff4947ef36f48c91b173037fdb88 Mon Sep 17 00:00:00 2001 From: cschwinne Date: Thu, 2 Jan 2020 02:12:10 +0100 Subject: [PATCH] Update year --- wled00/FX.cpp | 11 +++++++++-- wled00/FX.h | 4 +--- wled00/html_settings.h | 4 ++-- wled00/wled00.ino | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/wled00/FX.cpp b/wled00/FX.cpp index dac4aade..291703b6 100644 --- a/wled00/FX.cpp +++ b/wled00/FX.cpp @@ -2446,6 +2446,7 @@ uint16_t WS2812FX::mode_candle() */ #define STARBURST_MAX_FRAG 12 +//each needs 64 byte typedef struct particle { CRGB color; uint32_t birth =0; @@ -2456,10 +2457,16 @@ typedef struct particle { } star; uint16_t WS2812FX::mode_starburst(void) { + uint8_t numStars = 1 + (SEGLEN >> 3); + if (numStars > 15) numStars = 15; + uint16_t dataSize = sizeof(star) * numStars; + + if (!SEGENV.allocateData(dataSize)) return mode_static(); //allocation failed + uint32_t it = millis(); - const uint8_t numStars = 15; - static star stars[numStars]; + star* stars = reinterpret_cast(SEGENV.data); + float maxSpeed = 375.0f; // Max velocity float particleIgnition = 250.0f; // How long to "flash" float particleFadeTime = 1500.0f; // Fade out time diff --git a/wled00/FX.h b/wled00/FX.h index bb33741d..5bf896cb 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -248,9 +248,7 @@ class WS2812FX { return true; } void deallocateData(){ - if (data) { - delete[] data; - } + delete[] data; data = nullptr; WS2812FX::_usedSegmentData -= _dataLen; _dataLen = 0; diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 678aa281..a15e62eb 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -368,10 +368,10 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
Enable ArduinoOTA:

About

-WLED version 0.9.0-b1

+WLED version 0.9.0-b2

Contributors, dependencies and special thanks
A huge thank you to everyone who helped me create WLED!

-(c) 2016-2019 Christian Schwinne
+(c) 2016-2020 Christian Schwinne
Licensed under the MIT license

Server message: Response error!
diff --git a/wled00/wled00.ino b/wled00/wled00.ino index c77eae7a..7860c20b 100644 --- a/wled00/wled00.ino +++ b/wled00/wled00.ino @@ -98,7 +98,7 @@ //version code in format yymmddb (b = daily build) -#define VERSION 1912312 +#define VERSION 2001011 char versionString[] = "0.9.0-b2";