Skip to content

Commit 1876459

Browse files
authored
Merge branch 'wled:0_15_x' into 0_15_x
2 parents a6c869c + b155f80 commit 1876459

File tree

12 files changed

+111
-60
lines changed

12 files changed

+111
-60
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
uses: janheinrichmerker/[email protected]
2424
with:
2525
token: ${{ secrets.GITHUB_TOKEN }}
26-
sinceTag: v0.15.0
26+
sinceTag: v0.15.0
27+
releaseBranch: 0_15_x
2728
- name: Create draft release
2829
uses: softprops/action-gh-release@v1
2930
with:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.15.1.beta2",
3+
"version": "0.15.2-beta1",
44
"description": "Tools for WLED project",
55
"main": "tools/cdata.js",
66
"directories": {

platformio.ini

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ------------------------------------------------------------------------------
1111

1212
# CI/release binaries
13-
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover
13+
default_envs = nodemcuv2, esp8266_2m, esp01_1m_full, nodemcuv2_160, esp8266_2m_160, esp01_1m_full_160, nodemcuv2_compat, esp8266_2m_compat, esp01_1m_full_compat, esp32dev, esp32dev_V4, esp32_eth, lolin_s2_mini, esp32c3dev, esp32s3dev_16MB_opi, esp32s3dev_8MB_opi, esp32s3_4M_qspi, esp32_wrover
1414

1515
src_dir = ./wled00
1616
data_dir = ./wled00/data
@@ -140,7 +140,7 @@ lib_deps =
140140
IRremoteESP8266 @ 2.8.2
141141
makuna/NeoPixelBus @ 2.8.3
142142
#https://github.com/makuna/NeoPixelBus.git#CoreShaderBeta
143-
https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.2.1
143+
https://github.com/Aircoookie/ESPAsyncWebServer.git#v2.4.2
144144
# for I2C interface
145145
;Wire
146146
# ESP-NOW library
@@ -248,6 +248,7 @@ build_flags = -g
248248
-DARDUINO_ARCH_ESP32
249249
#-DCONFIG_LITTLEFS_FOR_IDF_3_2
250250
-D CONFIG_ASYNC_TCP_USE_WDT=0
251+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
251252
#use LITTLEFS library by lorol in ESP32 core 1.x.x instead of built-in in 2.x.x
252253
-D LOROL_LITTLEFS
253254
; -DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
@@ -259,7 +260,7 @@ large_partitions = tools/WLED_ESP32_8MB.csv
259260
extreme_partitions = tools/WLED_ESP32_16MB_9MB_FS.csv
260261
lib_deps =
261262
https://github.com/lorol/LITTLEFS.git
262-
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
263+
esp32async/AsyncTCP @ 3.4.7
263264
${env.lib_deps}
264265
# additional build flags for audioreactive
265266
AR_build_flags = -D USERMOD_AUDIOREACTIVE
@@ -280,9 +281,12 @@ build_flags = -g
280281
-Wshadow=compatible-local ;; emit warning in case a local variable "shadows" another local one
281282
-DARDUINO_ARCH_ESP32 -DESP32
282283
-D CONFIG_ASYNC_TCP_USE_WDT=0
284+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
283285
-DARDUINO_USB_CDC_ON_BOOT=0 ;; this flag is mandatory for "classic ESP32" when building with arduino-esp32 >=2.0.3
286+
-D WLED_ENABLE_DMX_INPUT
284287
lib_deps =
285-
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
288+
esp32async/AsyncTCP @ 3.4.7
289+
https://github.com/someweisguy/esp_dmx.git#47db25d
286290
${env.lib_deps}
287291
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
288292

@@ -296,13 +300,14 @@ build_flags = -g
296300
-DARDUINO_ARCH_ESP32S2
297301
-DCONFIG_IDF_TARGET_ESP32S2=1
298302
-D CONFIG_ASYNC_TCP_USE_WDT=0
303+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
299304
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_USB_DFU_ON_BOOT=0
300305
-DCO
301306
-DARDUINO_USB_MODE=0 ;; this flag is mandatory for ESP32-S2 !
302307
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
303308
;; ARDUINO_USB_CDC_ON_BOOT
304309
lib_deps =
305-
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
310+
esp32async/AsyncTCP @ 3.4.7
306311
${env.lib_deps}
307312
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
308313

@@ -316,12 +321,13 @@ build_flags = -g
316321
-DARDUINO_ARCH_ESP32C3
317322
-DCONFIG_IDF_TARGET_ESP32C3=1
318323
-D CONFIG_ASYNC_TCP_USE_WDT=0
324+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
319325
-DCO
320326
-DARDUINO_USB_MODE=1 ;; this flag is mandatory for ESP32-C3
321327
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
322328
;; ARDUINO_USB_CDC_ON_BOOT
323329
lib_deps =
324-
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
330+
esp32async/AsyncTCP @ 3.4.7
325331
${env.lib_deps}
326332
board_build.partitions = ${esp32.default_partitions} ;; default partioning for 4MB Flash - can be overridden in build envs
327333

@@ -336,12 +342,13 @@ build_flags = -g
336342
-DARDUINO_ARCH_ESP32S3
337343
-DCONFIG_IDF_TARGET_ESP32S3=1
338344
-D CONFIG_ASYNC_TCP_USE_WDT=0
345+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
339346
-DARDUINO_USB_MSC_ON_BOOT=0 -DARDUINO_DFU_ON_BOOT=0
340347
-DCO
341348
;; please make sure that the following flags are properly set (to 0 or 1) by your board.json, or included in your custom platformio_override.ini entry:
342349
;; ARDUINO_USB_MODE, ARDUINO_USB_CDC_ON_BOOT
343350
lib_deps =
344-
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0
351+
esp32async/AsyncTCP @ 3.4.7
345352
${env.lib_deps}
346353
board_build.partitions = ${esp32.large_partitions} ;; default partioning for 8MB flash - can be overridden in build envs
347354

@@ -432,6 +439,18 @@ lib_deps = ${esp32.lib_deps}
432439
monitor_filters = esp32_exception_decoder
433440
board_build.partitions = ${esp32.default_partitions}
434441

442+
[env:esp32dev_V4]
443+
board = esp32dev
444+
platform = ${esp32_idf_V4.platform}
445+
platform_packages = ${esp32_idf_V4.platform_packages}
446+
build_unflags = ${common.build_unflags}
447+
build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} -D WLED_RELEASE_NAME=\"ESP32_V4\" #-D WLED_DISABLE_BROWNOUT_DET
448+
${esp32.AR_build_flags}
449+
lib_deps = ${esp32_idf_V4.lib_deps}
450+
${esp32.AR_lib_deps}
451+
monitor_filters = esp32_exception_decoder
452+
board_build.partitions = ${esp32.default_partitions}
453+
435454
[env:esp32dev_8M]
436455
board = esp32dev
437456
platform = ${esp32_idf_V4.platform}
@@ -630,6 +649,7 @@ build_flags = ${common.build_flags} ${esp32s2.build_flags} -D WLED_RELEASE_NAME=
630649
-DLOLIN_WIFI_FIX ; seems to work much better with this
631650
-D WLED_WATCHDOG_TIMEOUT=0
632651
-D CONFIG_ASYNC_TCP_USE_WDT=0
652+
-D CONFIG_ASYNC_TCP_STACK_SIZE=8192
633653
-D DATA_PINS=16
634654
-D HW_PIN_SCL=35
635655
-D HW_PIN_SDA=33

wled00/FX_fcn.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,21 +1203,27 @@ void WS2812FX::finalizeInit() {
12031203
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
12041204
// determine if it is sensible to use parallel I2S outputs on ESP32 (i.e. more than 5 outputs = 1 I2S + 4 RMT)
12051205
unsigned maxLedsOnBus = 0;
1206+
unsigned busType = 0;
12061207
for (const auto &bus : busConfigs) {
12071208
if (Bus::isDigital(bus.type) && !Bus::is2Pin(bus.type)) {
12081209
digitalCount++;
1210+
if (busType == 0) busType = bus.type; // remember first bus type
1211+
if (busType != bus.type) {
1212+
DEBUG_PRINTF_P(PSTR("Mixed digital bus types detected! Forcing single I2S output.\n"));
1213+
useParallelI2S = false; // mixed bus types, no parallel I2S
1214+
}
12091215
if (bus.count > maxLedsOnBus) maxLedsOnBus = bus.count;
12101216
}
12111217
}
12121218
DEBUG_PRINTF_P(PSTR("Maximum LEDs on a bus: %u\nDigital buses: %u\n"), maxLedsOnBus, digitalCount);
1213-
// we may remove 300 LEDs per bus limit when NeoPixelBus is updated beyond 2.9.0
1214-
if (maxLedsOnBus <= 300 && useParallelI2S) BusManager::useParallelOutput(); // must call before creating buses
1219+
// we may remove 600 LEDs per bus limit when NeoPixelBus is updated beyond 2.8.3
1220+
if (digitalCount > 1 && maxLedsOnBus <= 600 && useParallelI2S) BusManager::useParallelOutput(); // must call before creating buses
12151221
else useParallelI2S = false; // enforce single I2S
1222+
digitalCount = 0;
12161223
#endif
12171224

12181225
// create buses/outputs
12191226
unsigned mem = 0;
1220-
digitalCount = 0;
12211227
for (const auto &bus : busConfigs) {
12221228
mem += bus.memUsage(Bus::isDigital(bus.type) && !Bus::is2Pin(bus.type) ? digitalCount++ : 0); // includes global buffer
12231229
if (mem <= MAX_LED_MEMORY) {

wled00/bus_wrapper.h

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -469,12 +469,20 @@ class PolyBus {
469469
}
470470

471471
static void* create(uint8_t busType, uint8_t* pins, uint16_t len, uint8_t channel) {
472-
#if defined(ARDUINO_ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
473472
// NOTE: "channel" is only used on ESP32 (and its variants) for RMT channel allocation
473+
474+
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
475+
if (_useParallelI2S && (channel >= 8)) {
476+
// Parallel I2S channels are to be used first, so subtract 8 to get the RMT channel number
477+
channel -= 8;
478+
}
479+
#endif
480+
481+
#if defined(ARDUINO_ARCH_ESP32) && !(defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32C3))
474482
// since 0.15.0-b3 I2S1 is favoured for classic ESP32 and moved to position 0 (channel 0) so we need to subtract 1 for correct RMT allocation
475483
if (!_useParallelI2S && channel > 0) channel--; // accommodate I2S1 which is used as 1st bus on classic ESP32
476-
// if user selected parallel I2S, RMT is used 1st (8 channels) followed by parallel I2S (8 channels)
477484
#endif
485+
478486
void* busPtr = nullptr;
479487
switch (busType) {
480488
case I_NONE: break;
@@ -862,12 +870,12 @@ class PolyBus {
862870
// I2S1 bus or paralell buses
863871
#ifndef CONFIG_IDF_TARGET_ESP32C3
864872
case I_32_I2_NEO_3: if (_useParallelI2S) (static_cast<B_32_IP_NEO_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_NEO_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); break;
865-
case I_32_I2_NEO_4: if (_useParallelI2S) (static_cast<B_32_IP_NEO_4*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_NEO_4*>(busPtr))->SetPixelColor(pix, col); break;
873+
case I_32_I2_NEO_4: if (_useParallelI2S) (static_cast<B_32_IP_NEO_4*>(busPtr))->SetPixelColor(pix, col); else (static_cast<B_32_I2_NEO_4*>(busPtr))->SetPixelColor(pix, col); break;
866874
case I_32_I2_400_3: if (_useParallelI2S) (static_cast<B_32_IP_400_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_400_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); break;
867-
case I_32_I2_TM1_4: if (_useParallelI2S) (static_cast<B_32_IP_TM1_4*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_TM1_4*>(busPtr))->SetPixelColor(pix, col); break;
875+
case I_32_I2_TM1_4: if (_useParallelI2S) (static_cast<B_32_IP_TM1_4*>(busPtr))->SetPixelColor(pix, col); else (static_cast<B_32_I2_TM1_4*>(busPtr))->SetPixelColor(pix, col); break;
868876
case I_32_I2_TM2_3: if (_useParallelI2S) (static_cast<B_32_IP_TM2_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_TM2_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); break;
869-
case I_32_I2_UCS_3: if (_useParallelI2S) (static_cast<B_32_IP_UCS_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_UCS_3*>(busPtr))->SetPixelColor(pix, Rgb48Color(RgbColor(col))); break;
870-
case I_32_I2_UCS_4: if (_useParallelI2S) (static_cast<B_32_IP_UCS_4*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_UCS_4*>(busPtr))->SetPixelColor(pix, Rgbw64Color(col)); break;
877+
case I_32_I2_UCS_3: if (_useParallelI2S) (static_cast<B_32_IP_UCS_3*>(busPtr))->SetPixelColor(pix, Rgb48Color(RgbColor(col))); else (static_cast<B_32_I2_UCS_3*>(busPtr))->SetPixelColor(pix, Rgb48Color(RgbColor(col))); break;
878+
case I_32_I2_UCS_4: if (_useParallelI2S) (static_cast<B_32_IP_UCS_4*>(busPtr))->SetPixelColor(pix, Rgbw64Color(col)); else (static_cast<B_32_I2_UCS_4*>(busPtr))->SetPixelColor(pix, Rgbw64Color(col)); break;
871879
case I_32_I2_APA106_3: if (_useParallelI2S) (static_cast<B_32_IP_APA106_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); else (static_cast<B_32_I2_APA106_3*>(busPtr))->SetPixelColor(pix, RgbColor(col)); break;
872880
case I_32_I2_FW6_5: if (_useParallelI2S) (static_cast<B_32_IP_FW6_5*>(busPtr))->SetPixelColor(pix, RgbwwColor(col.R, col.G, col.B, cctWW, cctCW)); else (static_cast<B_32_I2_FW6_5*>(busPtr))->SetPixelColor(pix, RgbwwColor(col.R, col.G, col.B, cctWW, cctCW)); break;
873881
case I_32_I2_2805_5: if (_useParallelI2S) (static_cast<B_32_IP_2805_5*>(busPtr))->SetPixelColor(pix, RgbwwColor(col.R, col.G, col.B, cctWW, cctCW)); else (static_cast<B_32_I2_2805_5*>(busPtr))->SetPixelColor(pix, RgbwwColor(col.R, col.G, col.B, cctWW, cctCW)); break;
@@ -1423,12 +1431,13 @@ class PolyBus {
14231431
return I_8266_U0_SM16825_5 + offset;
14241432
}
14251433
#else //ESP32
1426-
uint8_t offset = 0; // 0 = RMT (num 1-8), 1 = I2S0 (used by Audioreactive), 2 = I2S1
1434+
uint8_t offset = 0; // 0 = RMT (num 1-8), 1 = I2S1 [I2S0 is used by Audioreactive]
14271435
#if defined(CONFIG_IDF_TARGET_ESP32S2)
14281436
// ESP32-S2 only has 4 RMT channels
14291437
if (_useParallelI2S) {
14301438
if (num > 11) return I_NONE;
1431-
if (num > 3) offset = 1; // use x8 parallel I2S0 channels (use last to allow Audioreactive)
1439+
if (num < 8) offset = 1; // use x8 parallel I2S0 channels followed by RMT
1440+
// Note: conflicts with AudioReactive if enabled
14321441
} else {
14331442
if (num > 4) return I_NONE;
14341443
if (num > 3) offset = 1; // only one I2S0 (use last to allow Audioreactive)
@@ -1441,15 +1450,15 @@ class PolyBus {
14411450
// On ESP32-S3 only the first 4 RMT channels are usable for transmitting
14421451
if (_useParallelI2S) {
14431452
if (num > 11) return I_NONE;
1444-
if (num > 3) offset = 1; // use x8 parallel I2S LCD channels
1453+
if (num < 8) offset = 1; // use x8 parallel I2S LCD channels, followed by RMT
14451454
} else {
14461455
if (num > 3) return I_NONE; // do not use single I2S (as it is not supported)
14471456
}
14481457
#else
14491458
// standard ESP32 has 8 RMT and x1/x8 I2S1 channels
14501459
if (_useParallelI2S) {
14511460
if (num > 15) return I_NONE;
1452-
if (num > 7) offset = 1; // 8 RMT followed by 8 I2S
1461+
if (num < 8) offset = 1; // 8 I2S followed by 8 RMT
14531462
} else {
14541463
if (num > 9) return I_NONE;
14551464
if (num == 0) offset = 1; // prefer I2S1 for 1st bus (less flickering but more RAM needed)

0 commit comments

Comments
 (0)