New Segments are now initialized with default speed and intensity

This commit is contained in:
cschwinne 2020-09-07 21:01:10 +02:00
parent 2f2bebe506
commit 1fbe1d1855
4 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,10 @@
### Development versions after the 0.10.2 release ### Development versions after the 0.10.2 release
#### Build 2009070
- New Segments are now initialized with default speed and intensity
#### Build 2009030 #### Build 2009030
- Fixed bootloop if mDNS is used on builds without OTA support - Fixed bootloop if mDNS is used on builds without OTA support

View File

@ -37,6 +37,7 @@
#define DEFAULT_BRIGHTNESS (uint8_t)127 #define DEFAULT_BRIGHTNESS (uint8_t)127
#define DEFAULT_MODE (uint8_t)0 #define DEFAULT_MODE (uint8_t)0
#define DEFAULT_SPEED (uint8_t)128 #define DEFAULT_SPEED (uint8_t)128
#define DEFAULT_INTENSITY (uint8_t)128
#define DEFAULT_COLOR (uint32_t)0xFFAA00 #define DEFAULT_COLOR (uint32_t)0xFFAA00
#define MIN(a,b) ((a)<(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b))

View File

@ -529,6 +529,7 @@ void WS2812FX::resetSegments() {
_segments[0].colors[0] = DEFAULT_COLOR; _segments[0].colors[0] = DEFAULT_COLOR;
_segments[0].start = 0; _segments[0].start = 0;
_segments[0].speed = DEFAULT_SPEED; _segments[0].speed = DEFAULT_SPEED;
_segments[0].intensity = DEFAULT_INTENSITY;
_segments[0].stop = _length; _segments[0].stop = _length;
_segments[0].grouping = 1; _segments[0].grouping = 1;
_segments[0].setOption(SEG_OPTION_SELECTED, 1); _segments[0].setOption(SEG_OPTION_SELECTED, 1);
@ -541,6 +542,8 @@ void WS2812FX::resetSegments() {
_segments[i].grouping = 1; _segments[i].grouping = 1;
_segments[i].setOption(SEG_OPTION_ON, 1); _segments[i].setOption(SEG_OPTION_ON, 1);
_segments[i].opacity = 255; _segments[i].opacity = 255;
_segments[i].speed = DEFAULT_SPEED;
_segments[i].intensity = DEFAULT_INTENSITY;
_segment_runtimes[i].reset(); _segment_runtimes[i].reset();
} }
_segment_runtimes[0].reset(); _segment_runtimes[0].reset();

View File

@ -8,7 +8,7 @@
*/ */
// version code in format yymmddb (b = daily build) // version code in format yymmddb (b = daily build)
#define VERSION 2009030 #define VERSION 2009070
// ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS). // ESP8266-01 (blue) got too little storage space to work with all features of WLED. To use it, you must use ESP8266 Arduino Core v2.4.2 and the setting 512K(No SPIFFS).