Skip to content

Commit

Permalink
Update year
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie committed Jan 2, 2020
1 parent 0f3eeca commit 8013f8d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
11 changes: 9 additions & 2 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<star*>(SEGENV.data);

float maxSpeed = 375.0f; // Max velocity
float particleIgnition = 250.0f; // How long to "flash"
float particleFadeTime = 1500.0f; // Fade out time
Expand Down
4 changes: 1 addition & 3 deletions wled00/FX.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,7 @@ class WS2812FX {
return true;
}
void deallocateData(){
if (data) {
delete[] data;
}
delete[] data;
data = nullptr;
WS2812FX::_usedSegmentData -= _dataLen;
_dataLen = 0;
Expand Down
4 changes: 2 additions & 2 deletions wled00/html_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,10 @@ HTTP traffic is unencrypted. An attacker in the same network can intercept form
<button type="button" onclick="U()">Manual OTA Update</button><br>
Enable ArduinoOTA: <input type="checkbox" name="AO"><br>
<h3>About</h3>
<a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> version 0.9.0-b1<br><br>
<a href="https://github.com/Aircoookie/WLED" target="_blank">WLED</a> version 0.9.0-b2<br><br>
<a href="https://github.com/Aircoookie/WLED/wiki/Contributors-&-About" target="_blank">Contributors, dependencies and special thanks</a><br>
A huge thank you to everyone who helped me create WLED!<br><br>
(c) 2016-2019 Christian Schwinne <br>
(c) 2016-2020 Christian Schwinne <br>
<i>Licensed under the MIT license</i><br><br>
Server message: <span class="msg"> Response error! </span><hr>
<button type="button" onclick="B()">Back</button><button type="submit">Save & Reboot</button>
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled00.ino
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@


//version code in format yymmddb (b = daily build)
#define VERSION 1912312
#define VERSION 2001011
char versionString[] = "0.9.0-b2";


Expand Down

0 comments on commit 8013f8d

Please sign in to comment.