Skip to content

Commit 4a1ecc7

Browse files
authored
Merge pull request #1836 from Aircoookie/blackmagic
Defeat the black magic
2 parents 1f4a15e + e460782 commit 4a1ecc7

File tree

21 files changed

+2143
-2139
lines changed

21 files changed

+2143
-2139
lines changed

CHANGELOG.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
## WLED changelog
22

3-
### Development versions after 0.11.1 release
3+
### Development versions between 0.11.1 and 0.12.0 releases
4+
5+
#### Build 2103290
6+
7+
- Version bump to 0.12.0-b4 "Hikari"
8+
- Experimental use of [email protected]
9+
- Fixed RGBW mode disabled after LED settings saved
10+
- Fixed infrared support not compiled in if IRPIN is not defined
411

512
#### Build 2103230
613

@@ -233,7 +240,7 @@
233240
#### Build 2011153
234241

235242
- Fixed an ESP32 end-of-file issue
236-
- Fixed useRGBW not read from cfg.json
243+
- Fixed strip.isRgbw not read from cfg.json
237244

238245
#### Build 2011152
239246

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wled",
3-
"version": "0.12.0-b2",
3+
"version": "0.12.0-b4",
44
"description": "Tools for WLED project",
55
"main": "tools/cdata.js",
66
"directories": {

platformio.ini

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ build_flags = ${common.build_flags_esp8266} -D LEDPIN=1 -D WLED_DISABLE_INFRARED
259259

260260
[env:esp32dev]
261261
board = esp32dev
262-
platform = espressif32@2.0
262+
platform = espressif32@3.1.1
263263
build_unflags = ${common.build_unflags}
264264
build_flags = ${common.build_flags_esp32}
265265
lib_ignore =
@@ -268,7 +268,7 @@ lib_ignore =
268268

269269
[env:esp32_eth]
270270
board = esp32-poe
271-
platform = espressif32@2.0
271+
platform = espressif32@3.1.1
272272
upload_speed = 921600
273273
build_unflags = ${common.build_unflags}
274274
build_flags = ${common.build_flags_esp32} -D RLYPIN=-1 -D WLED_USE_ETHERNET -D BTNPIN=-1
@@ -387,7 +387,7 @@ build_flags = ${common.build_flags_esp8266} -D USE_WS2801
387387

388388
[env:custom32_LEDPIN_16]
389389
board = esp32dev
390-
platform = espressif32@2.0
390+
platform = espressif32@3.1.1
391391
build_unflags = ${common.build_unflags}
392392
build_flags = ${common.build_flags_esp32} -D LEDPIN=16 -D RLYPIN=19
393393
lib_ignore =
@@ -396,7 +396,7 @@ lib_ignore =
396396

397397
[env:custom32_APA102]
398398
board = esp32dev
399-
platform = espressif32@2.0
399+
platform = espressif32@3.1.1
400400
build_unflags = ${common.build_unflags}
401401
build_flags = ${common.build_flags_esp32} -D USE_APA102
402402
lib_ignore =
@@ -405,7 +405,7 @@ lib_ignore =
405405

406406
[env:custom32_TOUCHPIN_T0]
407407
board = esp32dev
408-
platform = espressif32@2.0
408+
platform = espressif32@3.1.1
409409
build_unflags = ${common.build_unflags}
410410
build_flags = ${common.build_flags_esp32} -D TOUCHPIN=T0
411411
lib_ignore =
@@ -414,7 +414,7 @@ lib_ignore =
414414

415415
[env:wemos_shield_esp32]
416416
board = esp32dev
417-
platform = espressif32@2.0
417+
platform = espressif32@3.1.1
418418
upload_port = /dev/cu.SLAB_USBtoUART
419419
monitor_port = /dev/cu.SLAB_USBtoUART
420420
upload_speed = 460800
@@ -431,7 +431,7 @@ build_flags = ${common.build_flags_esp32} -D LEDPIN=27 -D BTNPIN=39
431431
lib_ignore =
432432
ESPAsyncTCP
433433
ESPAsyncUDP
434-
platform = espressif32@2.0
434+
platform = espressif32@3.1.1
435435

436436
[env:sp501e]
437437
board = esp_wroom_02

usermods/usermod_v2_rotary_encoder_ui/platformio_override.ini.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_envs = d1_mini
44

55
[env:esp32dev]
66
board = esp32dev
7-
platform = espressif32@2.0
7+
platform = espressif32@3.1.1
88
build_unflags = ${common.build_unflags}
99
build_flags =
1010
${common.build_flags_esp32}

wled00/FX.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class WS2812FX {
584584
}
585585

586586
void
587-
finalizeInit(bool supportWhite, uint16_t countPixels, bool skipFirst),
587+
finalizeInit(uint16_t countPixels, bool skipFirst),
588588
service(void),
589589
blur(uint8_t),
590590
fill(uint32_t),
@@ -608,6 +608,7 @@ class WS2812FX {
608608
setPixelSegment(uint8_t n);
609609

610610
bool
611+
isRgbw = false,
611612
gammaCorrectBri = false,
612613
gammaCorrectCol = true,
613614
applyToAllSelected = true,
@@ -813,7 +814,6 @@ class WS2812FX {
813814
void handle_palette(void);
814815

815816
bool
816-
_useRgbw = false,
817817
_skipFirstMode,
818818
_triggered;
819819

wled00/FX_fcn.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@
4444
*/
4545

4646
//do not call this method from system context (network callback)
47-
void WS2812FX::finalizeInit(bool supportWhite, uint16_t countPixels, bool skipFirst)
47+
void WS2812FX::finalizeInit(uint16_t countPixels, bool skipFirst)
4848
{
49-
if (supportWhite == _useRgbw && countPixels == _length && _skipFirstMode == skipFirst) return;
5049
RESET_RUNTIME;
51-
_useRgbw = supportWhite;
5250
_length = countPixels;
5351
_skipFirstMode = skipFirst;
5452

@@ -163,7 +161,7 @@ uint16_t WS2812FX::realPixelIndex(uint16_t i) {
163161
void WS2812FX::setPixelColor(uint16_t i, byte r, byte g, byte b, byte w)
164162
{
165163
//auto calculate white channel value if enabled
166-
if (_useRgbw) {
164+
if (isRgbw) {
167165
if (rgbwMode == RGBW_MODE_AUTO_BRIGHTER || (w == 0 && (rgbwMode == RGBW_MODE_DUAL || rgbwMode == RGBW_MODE_LEGACY)))
168166
{
169167
//white value is set to lowest RGB channel
@@ -278,7 +276,7 @@ void WS2812FX::show(void) {
278276
}
279277

280278

281-
if (_useRgbw) //RGBW led total output with white LEDs enabled is still 50mA, so each channel uses less
279+
if (isRgbw) //RGBW led total output with white LEDs enabled is still 50mA, so each channel uses less
282280
{
283281
powerSum *= 3;
284282
powerSum = powerSum >> 2; //same as /= 4

wled00/alexa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void onAlexaChange(EspalexaDevice* dev)
6767
if (espalexaDevice->getColorMode() == EspalexaColorMode::ct) //shade of white
6868
{
6969
uint16_t ct = espalexaDevice->getCt();
70-
if (useRGBW)
70+
if (strip.isRgbw)
7171
{
7272
switch (ct) { //these values empirically look good on RGBW
7373
case 199: col[0]=255; col[1]=255; col[2]=255; col[3]=255; break;

wled00/cfg.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void deserializeConfig() {
9999

100100
JsonArray ins = hw_led["ins"];
101101
uint8_t s = 0; //bus iterator
102-
useRGBW = false;
102+
strip.isRgbw = false;
103103
busses.removeAll();
104104
uint32_t mem = 0;
105105
for (JsonObject elm : ins) {
@@ -127,13 +127,13 @@ void deserializeConfig() {
127127
uint8_t ledType = elm["type"] | TYPE_WS2812_RGB;
128128
bool reversed = elm["rev"];
129129
//RGBW mode is enabled if at least one of the strips is RGBW
130-
useRGBW = (useRGBW || BusManager::isRgbw(ledType));
130+
strip.isRgbw = (strip.isRgbw || BusManager::isRgbw(ledType));
131131
s++;
132132
BusConfig bc = BusConfig(ledType, pins, start, length, colorOrder, reversed);
133133
mem += busses.memUsage(bc);
134134
if (mem <= MAX_LED_MEMORY) busses.add(bc);
135135
}
136-
strip.finalizeInit(useRGBW, ledCount, skipFirstLed);
136+
strip.finalizeInit(ledCount, skipFirstLed);
137137
if (hw_led["rev"]) busses.getBus(0)->reversed = true; //set 0.11 global reversed setting for first bus
138138

139139
JsonObject hw_btn_ins_0 = hw[F("btn")][F("ins")][0];
@@ -491,7 +491,7 @@ void serializeConfig() {
491491
if (irPin>=0) {
492492
JsonObject hw_ir = hw.createNestedObject("ir");
493493
hw_ir["pin"] = irPin;
494-
hw_ir[F("type"] = irEnabled; // the byte 'irEnabled' does contain the IR-Remote Type ( 0=disabled )
494+
hw_ir[F("type")] = irEnabled; // the byte 'irEnabled' does contain the IR-Remote Type ( 0=disabled )
495495
}
496496
#endif
497497

wled00/colors.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void colorHStoRGB(uint16_t hue, byte sat, byte* rgb) //hue, sat to rgb
6464
case 4: rgb[0]=t,rgb[1]=p,rgb[2]=255;break;
6565
case 5: rgb[0]=255,rgb[1]=p,rgb[2]=q;
6666
}
67-
if (useRGBW && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
67+
if (strip.isRgbw && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
6868
}
6969

7070
void colorKtoRGB(uint16_t kelvin, byte* rgb) //white spectrum to rgb, calc
@@ -111,7 +111,7 @@ void colorCTtoRGB(uint16_t mired, byte* rgb) //white spectrum to rgb, bins
111111
} else {
112112
rgb[0]=237;rgb[1]=255;rgb[2]=239;//150
113113
}
114-
if (useRGBW && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
114+
if (strip.isRgbw && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
115115
}
116116

117117
#ifndef WLED_DISABLE_HUESYNC
@@ -169,7 +169,7 @@ void colorXYtoRGB(float x, float y, byte* rgb) //coordinates to rgb (https://www
169169
rgb[0] = 255.0*r;
170170
rgb[1] = 255.0*g;
171171
rgb[2] = 255.0*b;
172-
if (useRGBW && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
172+
if (strip.isRgbw && strip.rgbwMode == RGBW_MODE_LEGACY) colorRGBtoRGBW(col);
173173
}
174174

175175
void colorRGBtoXY(byte* rgb, float* xy) //rgb to coordinates (https://www.developers.meethue.com/documentation/color-conversions-rgb-xy)

wled00/data/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ input[type=number]::-webkit-outer-spin-button {
913913
}
914914

915915
.lstI {
916+
position: sticky;
916917
overflow: hidden;
917918
}
918919

@@ -930,7 +931,6 @@ input[type=number]::-webkit-outer-spin-button {
930931
}
931932

932933
.lstI.sticky, .lstI.selected {
933-
position: sticky;
934934
z-index: 1;
935935
}
936936

0 commit comments

Comments
 (0)