Release of v0.6.1
Added 3 effects (Android (27), Gradient (46) and Loading (47)) Support effect intensity setting for 4 additional effects (Twinkle Fade, Twinkle RF, Sparkle Inv and Sparkle Inv+) Removed 3 unused and duplicate effects
This commit is contained in:
parent
c855b8397a
commit
ba04aa7fef
@ -3,7 +3,7 @@
|
||||
WLED is a fast and (relatively) secure implementation of an ESP8266 webserver to control NeoPixel (WS2812B) LEDs!
|
||||
Now also with experimental ESP32 support.
|
||||
|
||||
### Features: (V0.6.0)
|
||||
### Features: (V0.6.1)
|
||||
- RGB, HSB, and brightness sliders
|
||||
- Settings page - configuration over network
|
||||
- Access Point and station mode - automatic failsafe AP
|
||||
|
@ -79,6 +79,7 @@ void WS2812FX::setMode(byte m) {
|
||||
_mode_last_call_time = 0;
|
||||
_mode_index = constrain(m, 0, MODE_COUNT-1);
|
||||
_mode_color = _color;
|
||||
_mode_var1 = 0;
|
||||
setBrightness(_brightness);
|
||||
strip_off_respectLock();
|
||||
}
|
||||
@ -131,7 +132,6 @@ void WS2812FX::setColor(uint32_t c) {
|
||||
|
||||
void WS2812FX::setSecondaryColor(uint32_t c) {
|
||||
_color_sec = c;
|
||||
_mode_color_sec = _color;
|
||||
if (_cronixieMode) _cronixieSecMultiplier = getSafePowerMultiplier(900, 100, c, _brightness);
|
||||
setBrightness(_brightness);
|
||||
}
|
||||
@ -625,7 +625,7 @@ void WS2812FX::mode_twinkle_fade(void) {
|
||||
setPixelColor(i, px_r, px_g, px_b, px_w);
|
||||
}
|
||||
|
||||
if(random(3) == 0) {
|
||||
if(random(256) < _intensity) {
|
||||
int ran = random(_led_count);
|
||||
if (!_locked[ran])
|
||||
setPixelColor(ran, _mode_color);
|
||||
@ -673,7 +673,7 @@ void WS2812FX::mode_flash_sparkle(void) {
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
|
||||
if(random(10) == 7) {
|
||||
if(random(256) <= _intensity) {
|
||||
int ran = random(_led_count);
|
||||
if (!_locked[ran])
|
||||
setPixelColor(ran , _color_sec);
|
||||
@ -696,7 +696,7 @@ void WS2812FX::mode_hyper_sparkle(void) {
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
|
||||
if(random(10) < 4) {
|
||||
if(random(256) <= _intensity) {
|
||||
for(uint16_t i=0; i < maxval(1, _led_count/3); i++) {
|
||||
int ran = random(_led_count);
|
||||
if (!_locked[ran])
|
||||
@ -802,9 +802,64 @@ void WS2812FX::mode_blink_rainbow(void) {
|
||||
|
||||
|
||||
/*
|
||||
* _color running on _color_sec.
|
||||
* Android loading circle
|
||||
*/
|
||||
void WS2812FX::mode_chase_white(void) {
|
||||
void WS2812FX::mode_android(void) {
|
||||
if (_counter_mode_call == 0) _mode_color = 0; //we use modecolor as bool
|
||||
for(uint16_t i=0; i < _led_count; i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color_sec);
|
||||
}
|
||||
|
||||
uint16_t a = _counter_mode_step;
|
||||
if (_mode_var1 > ((float)_intensity/255.0)*(float)_led_count)
|
||||
{
|
||||
_mode_color = 1;
|
||||
} else
|
||||
{
|
||||
if (_mode_var1 < 2) _mode_color = 0;
|
||||
}
|
||||
|
||||
if (_mode_color == 0)
|
||||
{
|
||||
if (_counter_mode_call %3 == 1) {a++;}
|
||||
else {_mode_var1++;}
|
||||
} else
|
||||
{
|
||||
a++;
|
||||
if (_counter_mode_call %3 != 1) _mode_var1--;
|
||||
}
|
||||
|
||||
if (a >= _led_count) a = 0;
|
||||
|
||||
if (a +_mode_var1 <= _led_count)
|
||||
{
|
||||
for(int i = a; i < a+_mode_var1; i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
} else
|
||||
{
|
||||
for(int i = a; i < _led_count; i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
for(int i = 0; i < _mode_var1 - (_led_count - a); i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
}
|
||||
_counter_mode_step = a;
|
||||
|
||||
show();
|
||||
_mode_delay = 3 + ((8 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _color_sec running on _color.
|
||||
*/
|
||||
void WS2812FX::mode_chase_color(void) {
|
||||
for(uint16_t i=0; i < _led_count; i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color_sec);
|
||||
@ -823,28 +878,6 @@ void WS2812FX::mode_chase_white(void) {
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* _color_sec running on _color.
|
||||
*/
|
||||
void WS2812FX::mode_chase_color(void) {
|
||||
for(uint16_t i=0; i < _led_count; i++) {
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, _color);
|
||||
}
|
||||
|
||||
uint16_t n = _counter_mode_step;
|
||||
uint16_t m = (_counter_mode_step + 1) % _led_count;
|
||||
if (!_locked[n])
|
||||
setPixelColor(n, _color_sec);
|
||||
if (!_locked[m])
|
||||
setPixelColor(m, _color_sec);
|
||||
show();
|
||||
|
||||
_counter_mode_step = (_counter_mode_step + 1) % _led_count;
|
||||
_mode_delay = 10 + ((30 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* color_sec running followed by random color.
|
||||
*/
|
||||
@ -1315,27 +1348,17 @@ void WS2812FX::mode_merry_christmas(void) {
|
||||
_mode_delay = 50 + ((75 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Random flickering.
|
||||
*/
|
||||
void WS2812FX::mode_fire_flicker(void) {
|
||||
mode_fire_flicker_int(3);
|
||||
}
|
||||
|
||||
/*
|
||||
* Random flickering, less intesity.
|
||||
*/
|
||||
void WS2812FX::mode_fire_flicker_soft(void) {
|
||||
mode_fire_flicker_int(6);
|
||||
}
|
||||
|
||||
void WS2812FX::mode_fire_flicker_int(int rev_intensity)
|
||||
void WS2812FX::mode_fire_flicker(void)
|
||||
{
|
||||
byte p_w = (_color & 0xFF000000) >> 24;
|
||||
byte p_r = (_color & 0x00FF0000) >> 16;
|
||||
byte p_g = (_color & 0x0000FF00) >> 8;
|
||||
byte p_b = (_color & 0x000000FF) >> 0;
|
||||
byte flicker_val = maxval(p_r,maxval(p_g, maxval(p_b, p_w)))/rev_intensity;
|
||||
byte flicker_val = maxval(p_r,maxval(p_g, maxval(p_b, p_w)))/(((256-_intensity)/16)+1);
|
||||
for(uint16_t i=0; i < _led_count; i++)
|
||||
{
|
||||
int flicker = random(0,flicker_val);
|
||||
@ -1351,30 +1374,90 @@ void WS2812FX::mode_fire_flicker_int(int rev_intensity)
|
||||
setPixelColor(i,r1,g1,b1,w1);
|
||||
}
|
||||
show();
|
||||
_mode_delay = 10 + ((500 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
|
||||
_mode_delay = 10 + ((400 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
|
||||
}
|
||||
|
||||
void WS2812FX::mode_fade_down(void)
|
||||
{
|
||||
for(uint16_t i=0; i < _led_count; i++) {
|
||||
uint32_t px_rgb = getPixelColor(i);
|
||||
/*
|
||||
* Gradient run
|
||||
*/
|
||||
void WS2812FX::mode_gradient(void) {
|
||||
byte p_w = (_color & 0xFF000000) >> 24;
|
||||
byte p_r = (_color & 0x00FF0000) >> 16;
|
||||
byte p_g = (_color & 0x0000FF00) >> 8;
|
||||
byte p_b = (_color & 0x000000FF) >> 0;
|
||||
byte p_w2 = (_color_sec & 0xFF000000) >> 24;
|
||||
byte p_r2 = (_color_sec & 0x00FF0000) >> 16;
|
||||
byte p_g2 = (_color_sec & 0x0000FF00) >> 8;
|
||||
byte p_b2 = (_color_sec & 0x000000FF) >> 0;
|
||||
byte nw,nr,ng,nb;
|
||||
float per,val; //0.0 = sec 1.0 = pri
|
||||
float brd = _intensity/2; if (brd <1.0) brd = 1.0;
|
||||
int pp = _counter_mode_step;
|
||||
int p1 = pp-_led_count;
|
||||
int p2 = pp+_led_count;
|
||||
|
||||
byte px_w = (px_rgb & 0xFF000000) >> 24;
|
||||
byte px_r = (px_rgb & 0x00FF0000) >> 16;
|
||||
byte px_g = (px_rgb & 0x0000FF00) >> 8;
|
||||
byte px_b = (px_rgb & 0x000000FF) >> 0;
|
||||
|
||||
// fade out (divide by 2)
|
||||
px_w = px_w >> 1;
|
||||
px_r = px_r >> 1;
|
||||
px_g = px_g >> 1;
|
||||
px_b = px_b >> 1;
|
||||
for(uint16_t i=0; i < _led_count; i++)
|
||||
{
|
||||
if (!_locked[i])
|
||||
setPixelColor(i, px_r, px_g, px_b, px_w);
|
||||
{
|
||||
val = minval(abs(pp-i),minval(abs(p1-i),abs(p2-i)));
|
||||
per = val/brd;
|
||||
if (per >1.0) per = 1.0;
|
||||
nw = p_w+((p_w2 - p_w)*per);
|
||||
nr = p_r+((p_r2 - p_r)*per);
|
||||
ng = p_g+((p_g2 - p_g)*per);
|
||||
nb = p_b+((p_b2 - p_b)*per);
|
||||
setPixelColor(i,nr,ng,nb,nw);
|
||||
}
|
||||
}
|
||||
show();
|
||||
|
||||
_mode_delay = 100 + ((100 * (uint32_t)(SPEED_MAX - _speed)) / SPEED_MAX);
|
||||
show();
|
||||
_counter_mode_step++;
|
||||
if (_counter_mode_step >= _led_count) _counter_mode_step = 0;
|
||||
if (_speed == 0) _counter_mode_step = _led_count >> 1;
|
||||
_mode_delay = 7 + ((25 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
|
||||
}
|
||||
|
||||
/*
|
||||
* Gradient run with hard transition
|
||||
*/
|
||||
void WS2812FX::mode_loading(void) {
|
||||
byte p_w = (_color & 0xFF000000) >> 24;
|
||||
byte p_r = (_color & 0x00FF0000) >> 16;
|
||||
byte p_g = (_color & 0x0000FF00) >> 8;
|
||||
byte p_b = (_color & 0x000000FF) >> 0;
|
||||
byte p_w2 = (_color_sec & 0xFF000000) >> 24;
|
||||
byte p_r2 = (_color_sec & 0x00FF0000) >> 16;
|
||||
byte p_g2 = (_color_sec & 0x0000FF00) >> 8;
|
||||
byte p_b2 = (_color_sec & 0x000000FF) >> 0;
|
||||
byte nw,nr,ng,nb;
|
||||
float per,val; //0.0 = sec 1.0 = pri
|
||||
float brd = _intensity; if (brd <1.0) brd = 1.0;
|
||||
int pp = _counter_mode_step;
|
||||
int p1 = pp+_led_count;
|
||||
|
||||
for(uint16_t i=0; i < _led_count; i++)
|
||||
{
|
||||
if (!_locked[i])
|
||||
{
|
||||
pp = _counter_mode_step;
|
||||
if (i > pp) pp+=_led_count;
|
||||
val = abs(pp-i);
|
||||
per = val/brd;
|
||||
if (per >1.0) per = 1.0;
|
||||
nw = p_w+((p_w2 - p_w)*per);
|
||||
nr = p_r+((p_r2 - p_r)*per);
|
||||
ng = p_g+((p_g2 - p_g)*per);
|
||||
nb = p_b+((p_b2 - p_b)*per);
|
||||
setPixelColor(i,nr,ng,nb,nw);
|
||||
}
|
||||
}
|
||||
|
||||
show();
|
||||
_counter_mode_step++;
|
||||
if (_counter_mode_step >= _led_count) _counter_mode_step = 0;
|
||||
if (_speed == 0) _counter_mode_step = _led_count -1;
|
||||
_mode_delay = 7 + ((25 * (uint32_t)(SPEED_MAX - _speed)) / _led_count);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -99,7 +99,7 @@
|
||||
#define FX_MODE_STROBE_RAINBOW 24
|
||||
#define FX_MODE_MULTI_STROBE 25
|
||||
#define FX_MODE_BLINK_RAINBOW 26
|
||||
#define FX_MODE_CHASE_WHITE 27
|
||||
#define FX_MODE_ANDROID 27
|
||||
#define FX_MODE_CHASE_COLOR 28
|
||||
#define FX_MODE_CHASE_RANDOM 29
|
||||
#define FX_MODE_CHASE_RAINBOW 30
|
||||
@ -118,8 +118,8 @@
|
||||
#define FX_MODE_FIREWORKS_RANDOM 43
|
||||
#define FX_MODE_MERRY_CHRISTMAS 44
|
||||
#define FX_MODE_FIRE_FLICKER 45
|
||||
#define FX_MODE_FIRE_FLICKER_SOFT 46
|
||||
#define FX_MODE_FADE_DOWN 47
|
||||
#define FX_MODE_GRADIENT 46
|
||||
#define FX_MODE_LOADING 47
|
||||
#define FX_MODE_DUAL_COLOR_WIPE_IN_OUT 48
|
||||
#define FX_MODE_DUAL_COLOR_WIPE_IN_IN 49
|
||||
#define FX_MODE_DUAL_COLOR_WIPE_OUT_OUT 50
|
||||
@ -164,7 +164,7 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
_mode[FX_MODE_STROBE_RAINBOW] = &WS2812FX::mode_strobe_rainbow;
|
||||
_mode[FX_MODE_MULTI_STROBE] = &WS2812FX::mode_multi_strobe;
|
||||
_mode[FX_MODE_BLINK_RAINBOW] = &WS2812FX::mode_blink_rainbow;
|
||||
_mode[FX_MODE_CHASE_WHITE] = &WS2812FX::mode_chase_white;
|
||||
_mode[FX_MODE_ANDROID] = &WS2812FX::mode_android;
|
||||
_mode[FX_MODE_CHASE_COLOR] = &WS2812FX::mode_chase_color;
|
||||
_mode[FX_MODE_CHASE_RANDOM] = &WS2812FX::mode_chase_random;
|
||||
_mode[FX_MODE_CHASE_RAINBOW] = &WS2812FX::mode_chase_rainbow;
|
||||
@ -183,8 +183,8 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
_mode[FX_MODE_FIREWORKS_RANDOM] = &WS2812FX::mode_fireworks_random;
|
||||
_mode[FX_MODE_MERRY_CHRISTMAS] = &WS2812FX::mode_merry_christmas;
|
||||
_mode[FX_MODE_FIRE_FLICKER] = &WS2812FX::mode_fire_flicker;
|
||||
_mode[FX_MODE_FIRE_FLICKER_SOFT] = &WS2812FX::mode_fire_flicker_soft;
|
||||
_mode[FX_MODE_FADE_DOWN] = &WS2812FX::mode_fade_down;
|
||||
_mode[FX_MODE_GRADIENT] = &WS2812FX::mode_gradient;
|
||||
_mode[FX_MODE_LOADING] = &WS2812FX::mode_loading;
|
||||
_mode[FX_MODE_DUAL_COLOR_WIPE_IN_OUT] = &WS2812FX::mode_dual_color_wipe_in_out;
|
||||
_mode[FX_MODE_DUAL_COLOR_WIPE_IN_IN] = &WS2812FX::mode_dual_color_wipe_in_in;
|
||||
_mode[FX_MODE_DUAL_COLOR_WIPE_OUT_OUT] = &WS2812FX::mode_dual_color_wipe_out_out;
|
||||
@ -206,7 +206,7 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
_color = DEFAULT_COLOR;
|
||||
_mode_color = DEFAULT_COLOR;
|
||||
_color_sec = 0;
|
||||
_mode_color_sec = 0;
|
||||
_mode_var1 = 0;
|
||||
_cc_fs = true;
|
||||
_cc_fe = false;
|
||||
_cc_is = 0;
|
||||
@ -331,7 +331,7 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
mode_strobe_rainbow(void),
|
||||
mode_multi_strobe(void),
|
||||
mode_blink_rainbow(void),
|
||||
mode_chase_white(void),
|
||||
mode_android(void),
|
||||
mode_chase_color(void),
|
||||
mode_chase_random(void),
|
||||
mode_chase_rainbow(void),
|
||||
@ -350,9 +350,8 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
mode_fireworks_random(void),
|
||||
mode_merry_christmas(void),
|
||||
mode_fire_flicker(void),
|
||||
mode_fire_flicker_soft(void),
|
||||
mode_fire_flicker_int(int),
|
||||
mode_fade_down(void),
|
||||
mode_gradient(void),
|
||||
mode_loading(void),
|
||||
mode_dual_color_wipe_in_out(void),
|
||||
mode_dual_color_wipe_in_in(void),
|
||||
mode_dual_color_wipe_out_out(void),
|
||||
@ -405,8 +404,8 @@ class WS2812FX : public NeoPixelBrightnessBus<PIXELFEATURE, PIXELMETHOD> {
|
||||
_counter_mode_call,
|
||||
_counter_mode_step,
|
||||
_counter_ccStep,
|
||||
_mode_var1,
|
||||
_mode_color,
|
||||
_mode_color_sec,
|
||||
_mode_delay;
|
||||
|
||||
double
|
||||
|
@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head><meta charset="utf-8">
|
||||
<link rel='shortcut icon' type='image/x-icon' href='/favicon.ico'/>
|
||||
<title>WLED 0.5.0</title>
|
||||
<title>WLED 0.6.1</title>
|
||||
<script>
|
||||
var d=document;
|
||||
var w=window.getComputedStyle(d.querySelector("html"));
|
||||
@ -602,8 +602,8 @@
|
||||
<option value="24">Strobe Cl (24)</option>
|
||||
<option value="25">Strobe + (25)</option>
|
||||
<option value="26">Blink Cl (26)</option>
|
||||
<option value="27">Chase (27)</option>
|
||||
<option value="28">Chase Inv (28)</option>
|
||||
<option value="27">Android (27)</option>
|
||||
<option value="28">Chase (28)</option>
|
||||
<option value="29">Chase R (29)</option>
|
||||
<option value="30">Chase Rainbow (30)</option>
|
||||
<option value="31">Chase Flash (31)</option>
|
||||
@ -621,8 +621,8 @@
|
||||
<option value="43">Fireworks R (43)</option>
|
||||
<option value="44">Christmas (44)</option>
|
||||
<option value="45">Fire Flicker (45)</option>
|
||||
<option value="46">Unused (46)</option>
|
||||
<option value="47">Internal (47)</option>
|
||||
<option value="46">Gradient (46)</option>
|
||||
<option value="47">Loading (47)</option>
|
||||
<option value="48">Wipe IO (48)</option>
|
||||
<option value="49">Wipe II (49)</option>
|
||||
<option value="50">Wipe OO (50)</option>
|
||||
|
File diff suppressed because one or more lines are too long
@ -335,7 +335,7 @@ 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">WLED</a> version 0.6.0<br>
|
||||
<a href="https://github.com/Aircoookie/WLED">WLED</a> version 0.6.1<br>
|
||||
(c) 2016-2018 Christian Schwinne <br>
|
||||
<i>Licensed under the MIT license</i><br><br>
|
||||
<i>Uses libraries:</i><br>
|
||||
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
/*
|
||||
* @title WLED project sketch
|
||||
* @version 0.6.0
|
||||
* @version 0.6.1
|
||||
* @author Christian Schwinne
|
||||
*/
|
||||
|
||||
@ -33,8 +33,8 @@
|
||||
#include "WS2812FX.h"
|
||||
|
||||
//version in format yymmddb (b = daily build)
|
||||
#define VERSION 1803152
|
||||
const String versionString = "0.6.0";
|
||||
#define VERSION 1803182
|
||||
const String versionString = "0.6.1";
|
||||
|
||||
//AP and OTA default passwords (change them!)
|
||||
String apPass = "wled1234";
|
||||
|
Loading…
Reference in New Issue
Block a user