Skip to content

Conversation

@netmindz
Copy link
Member

@netmindz netmindz commented Nov 8, 2025

C6 needs the newer ESP-IDF, so have one branch for those changes and keep this one just for the C6 specific things

Building on top of V5

Inspired by C6 Experiments


Helpful information and migration guidance

coding guides

We should make sure that the "V5" branch will still compile for "V4" as a backup solution.
When adding code that only works in the new framework, it should be conditionally compiled, like in the examples below

  • "V5" code only for esp32-P4 or esp32-C6:
 #if defined(CONFIG_IDF_TARGET_ESP32C6)
    // https://docs.espressif.com/projects/esp-idf/en/latest/esp32c6/api-reference/peripherals/gpio.html
    // strapping pins: 4, 5, 8, 9
    if (gpio > 11 && gpio < 14) return false;     // 12-13 USB-JTAG
    if (gpio > 23 && gpio < 31) return false;     // 24-30 SPI FLASH
#elif defined(CONFIG_IDF_TARGET_ESP32P4)
    // strapping pins: 34,35,36,37,38
    if (             gpio <   2) return false;     // NC
    if (gpio > 13 && gpio <  20) return false;     // ESP-Hosted WiFi pins
    if (gpio > 23 && gpio <  26) return false;     // USB Pins
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
  // .... existing code
#else
  // .... existing code
#endif
  • "V5" code that is not specific to new boards
      #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
      ledcAttach(pwmPin, 25000, 8);  // New API: ledcAttach(pin, freq, resolution)
      #else
      ledcSetup(pwmChannel, 25000, 8);
      // attach the channel to the GPIO to be controlled
      ledcAttachPin(pwmPin, pwmChannel);
      #endif

related

Summary by CodeRabbit

  • New Features

    • Added support for ESP32‑C6 boards (8MB and 4MB variants) in build environments.
  • Bug Fixes / Compatibility

    • Aligned ESP32‑C6 and ESP32‑P4 behavior with existing ESP32C3 handling to ensure consistent hardware feature availability (DMX, parallel I2S, touch, PSRAM, memory limits).
  • Chores

    • Updated default board/environment selections and library dependency adjustments for improved multi‑chip support.

✏️ Tip: You can customize this high-level summary in your review settings.

netmindz and others added 3 commits November 8, 2025 13:33
due to Arduino 3.0.1, a few updated libraries are required:
* Tasmota Platform - official platfomio lacks arduino support for C6
* FastLED (latest + C6 build patches)
* AsyncTCP (latest + C6 build patches)
* AsyncWebServer (latest + C6 build patches)
* NeoPixelBus (lastest)
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 8, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds ESP32-C6 platform support and adjusts platform/environment defaults in platformio.ini; extends multiple ESP32-related preprocessor guards across source files to treat ESP32C6 (and ESP32P4) like ESP32C3 for several features (parallel I2S, touch, PSRAM, memory limits, DMX/hardware defaults).

Changes

Cohort / File(s) Summary
Project config / new boards
platformio.ini
Adds [esp32c6] generic block and two new envs [env:esp32c6dev_8MB], [env:esp32c6dev_4MB]; reorders/toggles several ESP32/ESP32-C3 entries; adjusts lib_deps, build flags, partition and flash settings; comments/patches FastLED and IRremoteESP8266 entries for C6 support.
Parallel I2S / bus logic guards
wled00/FX_fcn.cpp, wled00/bus_wrapper.h, wled00/cfg.cpp, wled00/set.cpp, wled00/wled.h
Expanded conditional compilation to exclude CONFIG_IDF_TARGET_ESP32C6 and CONFIG_IDF_TARGET_ESP32P4 (in addition to ESP32C3) from code paths that enable parallel I2S, I2S1/parallel bus types, and related defaults; affects compile-time availability of parallel I2S and bus selection.
Touch / button handling
wled00/button.cpp
Extended target exclusions for BTN_TYPE_TOUCH and BTN_TYPE_TOUCH_SWITCH to also skip ESP32C6 and ESP32P4, disabling touch-based press detection on those targets at compile time.
PSRAM / allocation guards
wled00/util.cpp
Broadened PSRAM and allocation guards to include ESP32C6 (and ESP32P4 in allocation path), changing which targets trigger PSRAM-specific error paths and alternate heap/RTC RAM allocation behavior.
Memory / limits constants
wled00/const.h
Treated ESP32C6 like ESP32C3 for WLED_MAX_DIGITAL_CHANNELS, MAX_LEDS, and MAX_LED_MEMORY via expanded preprocessor conditions.
Serialization / info reporting
wled00/json.cpp
Expanded target checks so arch remains "esp32" for ESP32C6 and ESP32P4 by broadening preprocessor condition in serializeInfo.
Configuration serialization/deserialization
wled00/cfg.cpp
Extended compile-time guards that control useParallelI2S and BusManager::hasParallelOutput() to exclude ESP32C6 and ESP32P4 similar to ESP32C3.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Platform config changes (new envs, partitions, patched deps) deserve careful validation.
  • Multiple source files change related preprocessor guards—verify consistent intent and no accidental feature removals.
  • Areas needing extra attention:
    • platformio.ini new env entries, partition CSV references and build flags.
    • wled00/bus_wrapper.h and wled00/FX_fcn.cpp for correct bus selection logic.
    • wled00/util.cpp for PSRAM/allocation correctness on C6/P4.
    • wled00/wled.h for DMX/hardware defaults and TX power macros.

Possibly related PRs

Suggested reviewers

  • netmindz

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding ESP32-C6 support to ESP-IDF V5 builds, which aligns with the extensive file modifications across platformio.ini and multiple source files.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

platformio.ini Outdated
Comment on lines 14 to 28
;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_debug
;esp32_eth
;esp32_wrover
; lolin_s2_mini ;; TODO: disabled NeoEsp32RmtMethodIsr
esp32c3dev
;esp32c3dev
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: revert before merge, here to save CI build time

@netmindz
Copy link
Member Author

netmindz commented Nov 8, 2025

@softhack007 I've started trying to cherry-pick your changes over, quite a few don't apply due to the changes with MM, but I'll try and resolve the merge conflicts for those that are simple

* more debug output
* added my own fork of FastLED ( looks like more bugs to solve ....)
@softhack007
Copy link
Member

@softhack007 I've started trying to cherry-pick your changes over, quite a few don't apply due to the changes with MM, but I'll try and resolve the merge conflicts for those that are simple

@netmindz thanks, I'll try to help once I'm finished with some open ends in WLED-MM 😁 december

@netmindz
Copy link
Member Author

netmindz commented Nov 8, 2025

Possibly also worth looking at #4626 to see if there are any changes there that are helpful

@softhack007
Copy link
Member

softhack007 commented Nov 18, 2025

@netmindz and all,

please keep in mind that there is another "open end" for moving to ESP-IDF V5:
--> The ledc API has changed, and its not compatible with the previous "V4" API. This means we need to adapt the "analog LEDs" PWM driver, to make it work with V5.

Most likely we'll need some more #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) conditional code in the BusPWM driver. 🤔 Unless we completely drop PWM "analog" support in V5 builds, but I think this is not an option.


Edit: more information is here:

@softhack007 softhack007 added this to the 0.17.0 milestone Nov 18, 2025
@softhack007 softhack007 mentioned this pull request Nov 18, 2025
@netmindz
Copy link
Member Author

@netmindz and all,

please keep in mind that there is another "open end" for moving to ESP-IDF V5: --> The ledc API has changed, and its not compatible with the previous "V4" API. This means we need to adapt the "analog LEDs" PWM driver, to make it work with V5.

Most likely we'll need some more #if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) conditional code in the BusPWM driver. 🤔 Unless we completely drop PWM "analog" support in V5 builds, but I think this is not an option.

That is generic to V5 rather than being specific to C6 isn't it, so would be part of the other PR

@softhack007
Copy link
Member

That is generic to V5 rather than being specific to C6 isn't it, so would be part of the other PR

I agree, this would be something to address in the generic V5 PR #4838

@softhack007
Copy link
Member

@coderabbitai review

Additionally, please update your previous review comments to match the latest source code.

This PR extends PR#4838 (V5 branch), so you can focus on code which is different from the V5 branch.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7e46616 and 152bfd1.

📒 Files selected for processing (1)
  • platformio.ini (3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
platformio.ini

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use platformio.ini as the single source of truth for hardware build targets and settings

Files:

  • platformio.ini
🧠 Learnings (12)
📓 Common learnings
Learnt from: DedeHai
Repo: wled/WLED PR: 4798
File: wled00/FX.cpp:7531-7533
Timestamp: 2025-08-26T11:51:21.817Z
Learning: In WLED PR #4798, DedeHai confirmed that certain gamma-related calls in FX.cpp/FX_fcn.cpp/particle systems are intentional for effect-level shaping (e.g., brightness curves, TV sim, Pride 2015 pre-mix), distinct from final output gamma. Do not flag or remove these in future reviews; add comments when feasible to clarify intent.
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with appropriate defined constants when those constants are meaningful in the context of the PR. For example, the hardcoded value 32 should be replaced with WLED_MAX_SEGNAME_LEN when it represents a segment name length limit. This improves code maintainability and reduces the risk of inconsistencies.
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Applies to platformio.ini : Use platformio.ini as the single source of truth for hardware build targets and settings
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S:8-16
Timestamp: 2025-09-02T02:27:39.220Z
Learning: The ESP32 macro is defined when compiling code on all ESP32 variants (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.) in the Arduino framework, providing consistent library compatibility across the entire ESP32 family. For target-specific detection, CONFIG_IDF_TARGET_* macros should be used instead.
Learnt from: blazoncek
Repo: wled/WLED PR: 4482
File: wled00/udp.cpp:147-149
Timestamp: 2025-02-19T12:43:34.199Z
Learning: ESP8266 and ESP32 platforms have different maximum segment name lengths in WLED, which can cause truncation when syncing segment names between devices. This platform difference affects the user experience when using the segment name sync feature.
Learnt from: softhack007
Repo: wled/WLED PR: 5107
File: boards/adafruit_matrixportal_esp32s3.json:1-66
Timestamp: 2025-11-22T20:33:14.840Z
Learning: In WLED, board JSON files in the boards/ directory may reference partition files that don't exist or have slightly different names than actual files in tools/. This is intentional because platformio.ini or platformio_override.sample.ini explicitly override the partition file using the board_build.partitions setting, which takes precedence over the board JSON partition reference. This pattern exists in multiple local board definitions and should not be flagged as an issue.
📚 Learning: 2025-10-05T15:24:05.545Z
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Applies to platformio.ini : Use platformio.ini as the single source of truth for hardware build targets and settings

Applied to files:

  • platformio.ini
📚 Learning: 2025-11-22T20:33:14.840Z
Learnt from: softhack007
Repo: wled/WLED PR: 5107
File: boards/adafruit_matrixportal_esp32s3.json:1-66
Timestamp: 2025-11-22T20:33:14.840Z
Learning: In WLED, board JSON files in the boards/ directory may reference partition files that don't exist or have slightly different names than actual files in tools/. This is intentional because platformio.ini or platformio_override.sample.ini explicitly override the partition file using the board_build.partitions setting, which takes precedence over the board JSON partition reference. This pattern exists in multiple local board definitions and should not be flagged as an issue.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-02T01:45:58.047Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:31-36
Timestamp: 2025-09-02T01:45:58.047Z
Learning: For the NeoEsp32RmtHI driver, RISC-V ESP32-C3 support is currently disabled via bus_wrapper.h rather than compile-time guards, as the maintainer willmmiles is working on resolving underlying nested interrupt issues and prefers to centralize the workaround in one location.

Applied to files:

  • platformio.ini
📚 Learning: 2025-07-06T16:15:24.051Z
Learnt from: Jason2866
Repo: wled/WLED PR: 4167
File: platformio.ini:427-430
Timestamp: 2025-07-06T16:15:24.051Z
Learning: In espressif Arduino framework, `-fno-lto` is set as a standard default in the `platformio-build.py` script. Therefore, using `-fno-lto` in `build_unflags` is not only valid but necessary to remove this default setting before enabling LTO with `-flto=auto` or `-flto=4` in `build_flags`.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-02T02:27:39.220Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S:8-16
Timestamp: 2025-09-02T02:27:39.220Z
Learning: The ESP32 macro is defined when compiling code on all ESP32 variants (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.) in the Arduino framework, providing consistent library compatibility across the entire ESP32 family. For target-specific detection, CONFIG_IDF_TARGET_* macros should be used instead.

Applied to files:

  • platformio.ini
📚 Learning: 2025-07-06T16:11:05.896Z
Learnt from: Jason2866
Repo: wled/WLED PR: 4167
File: platformio.ini:427-430
Timestamp: 2025-07-06T16:11:05.896Z
Learning: In PlatformIO, using `-fno-lto` in `build_unflags` is a valid pattern to remove potentially existing `-fno-lto` flags from the build system before adding `-flto=auto` in `build_flags`. This ensures that LTO can be enabled without conflicts from default build system flags that might disable LTO.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-02T02:15:44.324Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:87-91
Timestamp: 2025-09-02T02:15:44.324Z
Learning: ESP_ERROR_CHECK_WITHOUT_ABORT_SILENT_TIMEOUT is part of the NeoPixelBus library API and can be safely depended upon when NeoPixelBus is a declared dependency.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-02T01:48:16.409Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:72-85
Timestamp: 2025-09-02T01:48:16.409Z
Learning: In NeoPixelBus driver code, ESP_ERROR_CHECK (which can abort) is used in destructors when driver uninstall failures indicate hardware is in an unsafe configuration, as such errors are considered unrecoverable hardware safety issues rather than typical software errors.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-16T18:08:42.848Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1176-1187
Timestamp: 2025-09-16T18:08:42.848Z
Learning: In WLED finalizeInit() bus creation (wled00/FX_fcn.cpp), intentionally allowing memory overruns when bus configurations exceed MAX_LED_MEMORY is a deliberate design choice. The trade-off prioritizes creating buses with reduced LED counts over completely failing to create buses, which would cause no LED output and UI failures. This approach forces users to update configurations after migrating to version 0.16 while maintaining basic functionality.

Applied to files:

  • platformio.ini
📚 Learning: 2025-02-19T12:43:34.199Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4482
File: wled00/udp.cpp:147-149
Timestamp: 2025-02-19T12:43:34.199Z
Learning: ESP8266 and ESP32 platforms have different maximum segment name lengths in WLED, which can cause truncation when syncing segment names between devices. This platform difference affects the user experience when using the segment name sync feature.

Applied to files:

  • platformio.ini
📚 Learning: 2025-08-29T00:26:15.808Z
Learnt from: ksedgwic
Repo: wled/WLED PR: 4883
File: usermods/usermod_v2_skystrip/rest_json_client.h:6-14
Timestamp: 2025-08-29T00:26:15.808Z
Learning: WLED uses a vendored ArduinoJson library (version 6) located at "src/dependencies/json/ArduinoJson-v6.h" which is included through wled.h. Usermods should not directly include ArduinoJson headers but instead rely on wled.h for ArduinoJson symbols. The standard pattern is to include wled.h and use JsonObject, JsonArray, DynamicJsonDocument, etc. without additional includes.

Applied to files:

  • platformio.ini
🔇 Additional comments (3)
platformio.ini (3)

12-32: Default environment should be reverted before merge.

Line 14's TODO comment indicates that setting esp32c6dev_4MB as the default environment (line 32) is temporary to save CI build time and should be reverted before this PR is merged. Confirm whether this is intentional or if you need to restore the original default environments.


401-434: Approve structure of 8MB environment, pending fixes to generic [esp32c6] section.

The [env:esp32c6dev_8MB] section is well-structured and correctly inherits from the generic [esp32c6] section. Once the critical flag and board definition issues in the generic section are fixed, this environment will have the necessary settings. The build flags, partitions, and library dependencies are appropriate.


436-442: Approve 4MB environment variant.

The [env:esp32c6dev_4MB] section correctly extends the 8MB variant and overrides the board, partitions, and release name flags as needed. The structure is clean and the changes are appropriate.

@softhack007
Copy link
Member

@coderabbitai, please review this PR, focusing on the C6-specific code that differs from the V5 branch (PR#4838), and also update any previous review comments to reflect the latest source code.

Additionally, i would like you to make two special lists:

  • locations in the source code that are marked as temporary solutions
  • analyse the build logs for compilation warnings, and summarize how and where we can improve/modernize the code

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# First, let's check what files have been changed in this PR
echo "=== Files changed in this PR ==="
gh pr view 5048 --repo wled/WLED --json files --jq '.files[].path' | head -20

echo -e "\n=== PR details ==="
gh pr view 5048 --repo wled/WLED --json title,body,headRefName,baseRefName

echo -e "\n=== Recent commits ==="
gh pr view 5048 --repo wled/WLED --json commits --jq '.commits[-5:] | .[] | "\(.commit.oid[0:8]) \(.commit.message | split("\n")[0])"'

Length of output: 3493


🏁 Script executed:

#!/bin/bash

# Search for C6-specific code patterns across common source directories
echo "=== C6-specific code patterns ==="
echo -e "\n--- CONFIG_IDF_TARGET_ESP32C6 references ---"
rg -n "CONFIG_IDF_TARGET_ESP32C6" --type=cpp --type=c --type=h -C 2

echo -e "\n--- ESP32-C6 or ESP32C6 mentions in code ---"
rg -n "ESP32.?C6|ESP32_C6" --type=cpp --type=c --type=h -C 1 | head -100

Length of output: 24527


🏁 Script executed:

#!/bin/bash

# Search for temporary solutions and markers
echo "=== Temporary solutions and markers ==="

echo -e "\n--- TODO comments ---"
rg -n "TODO|@todo" --type=cpp --type=c --type=h -g '!**/test/**' -C 1 | head -100

echo -e "\n--- FIXME comments ---"
rg -n "FIXME|@fixme" --type=cpp --type=c --type=h -g '!**/test/**' -C 1

echo -e "\n--- HACK/TEMP/WORKAROUND markers ---"
rg -n "HACK|TEMP|WORKAROUND|temporary|workaround" --type=cpp --type=c --type=h -g '!**/test/**' -C 1 | head -100

echo -e "\n--- XXX markers ---"
rg -n "XXX" --type=cpp --type=c --type=h -g '!**/test/**' -C 1

Length of output: 13837


🏁 Script executed:

#!/bin/bash

# Get the latest workflow runs for this PR
echo "=== GitHub Actions workflow runs for this PR ==="
gh run list --repo wled/WLED --branch V5-C6 --limit 5 --json databaseId,name,status,conclusion,createdAt

# Get the most recent run ID
RUN_ID=$(gh run list --repo wled/WLED --branch V5-C6 --limit 1 --json databaseId --jq '.[0].databaseId')

if [ ! -z "$RUN_ID" ]; then
  echo -e "\n=== Latest workflow run details (ID: $RUN_ID) ==="
  gh run view $RUN_ID --repo wled/WLED --log 2>&1 | grep -i "warning\|error" | head -100
fi

Length of output: 24287


🏁 Script executed:

#!/bin/bash

# Let's look at the platformio.ini changes specifically for C6
echo "=== platformio.ini C6-specific sections ==="
cat platformio.ini | grep -A 30 "\[esp32c6\]"
cat platformio.ini | grep -A 30 "\[env:esp32c6"

Length of output: 4136


🏁 Script executed:

#!/bin/bash

# Check for any C6-specific preprocessor conditionals in common files
echo "=== Checking common WLED files for C6 conditionals ==="

# Check main WLED files
for file in wled00/*.cpp wled00/*.h; do
  if [ -f "$file" ]; then
    if rg -q "C6|CONFIG_IDF_TARGET_ESP32C6" "$file"; then
      echo -e "\n--- $file ---"
      rg -n "C6|CONFIG_IDF_TARGET_ESP32C6" "$file" -C 3
    fi
  fi
done

Length of output: 18924


🏁 Script executed:

#!/bin/bash

# Look for FastLED C6-specific changes or references
echo "=== FastLED C6 references ==="
rg -n "FastLED.*C6|C6.*FastLED" -g "*.ini" -g "*.cpp" -g "*.h" -C 2

Length of output: 391


@softhack007: I've completed the review of this PR, focusing on ESP32-C6 specific changes. Here are my findings:

C6-Specific Changes Summary

The PR properly implements ESP32-C6 support through conditional compilation using CONFIG_IDF_TARGET_ESP32C6 macros. The changes are consistent across the codebase and follow the established pattern for other ESP32 variants.

Key C6-Specific Additions:

  1. platformio.ini: New [esp32c6] section and build environments (esp32c6dev_8MB, esp32c6dev_4MB)

  2. Hardware limitations properly addressed:

    • Parallel I2S disabled (C6 doesn't support it)
    • Only 2 RMT channels available
    • Touch sensor support excluded
    • Memory limits: MAX_LEDS=4096, MAX_LED_MEMORY=32768
  3. Disabled features (intentionally):

    • WLED_DISABLE_INFRARED
    • WLED_DISABLE_ALEXA
    • WLED_DISABLE_WEBSOCKETS
    • WLED_DISABLE_ESPNOW (temporary)

📋 List 1: Temporary Solutions in Source Code

Critical/Platform-Specific:

  1. wled00/ota_update.cpp:433 - "ESP32-C6 update not supported yet" - OTA functionality needs implementation
  2. platformio.ini:167 - Patched FastLED commented out: https://github.com/softhack007/FastLED.git#ESP32-C6
  3. platformio.ini - ESPNOW disabled with TODO comment: "ToDO: temporarily disabled, until we find a solution for esp-now build errors with -C6"
  4. wled00/bus_wrapper.h:8 - "temporary shim for NeoPixelBus CORE3 / RMT driver_v2"
  5. wled00/bus_wrapper.h:1308 - "temporary hack to limit use of hardware SPI to a single SPI peripheral"

Memory Management:

  1. wled00/util.cpp:687 - "TODO: between allocate and free, heap can run low (async web access), only IDF V5 allows for a pre-allocation-check of all free blocks"

Effect & Protocol:

  1. wled00/FX_fcn.cpp:1294, 1305, 1575 - Multiple "workaround for on/off transition to respect blending style"
  2. wled00/udp.cpp:40 - "TODO: optimize size to use only active segments"
  3. wled00/udp.cpp:201 - "TODO: add actual used buffer size"
  4. wled00/udp.cpp:816 - "TODO: determine if we want to send an empty push packet"

Configuration:

  1. wled00/wled.h:942 - busConfigs marked as "temporary, to remember values from network callback until after"
  2. wled00/wled.cpp:858 - AP_BEHAVIOR_TEMPORARY timeout handling

⚠️ List 2: Compilation Warnings & Modernization Opportunities

High Priority - Deprecated APIs:

Location: wled00/const.h:64

#define WLED_MAX_ANALOG_CHANNELS (LEDC_CHANNEL_MAX*LEDC_SPEED_MODE_MAX)
  • Warning: arithmetic between different enumeration types 'ledc_channel_t' and 'ledc_mode_t' is deprecated
  • Fix: Cast enums to int before multiplication: (int(LEDC_CHANNEL_MAX)*int(LEDC_SPEED_MODE_MAX))
  • Impact: Repeated 15+ times across build logs

Location: Multiple ADC usage locations

  • Warning: legacy adc driver is deprecated, please migrate to use esp_adc/adc_oneshot.h
  • Fix: Migrate to new ESP-IDF V5 ADC API
  • Impact: Required for long-term V5 compatibility

Location: Multiple DAC usage locations

  • Warning: The legacy DAC driver is deprecated, please use driver/dac_oneshot.h
  • Fix: Migrate to new ESP-IDF V5 DAC API
  • Impact: Required for long-term V5 compatibility

Medium Priority - C++20 Compliance:

Location: wled00/src/dependencies/espalexa/Espalexa.h:254, 257, 268

  • Warning: implicit capture of 'this' via '[=]' is deprecated in C++20
  • Fix: Use explicit captures: [=, this] or [this, ...]
  • Impact: Repeated 20+ times

Location: wled00/src/dependencies/espalexa/Espalexa.h:382

  • Warning: 'virtual void NetworkUDP::flush()' is deprecated: Use clear() instead
  • Fix: Replace flush() with clear()
  • Impact: Repeated 15+ times

Low Priority - Code Quality:

Location: .pio/libdeps/esp32dev/FastLED/src/noise.cpp:756, 791, 831

  • Warning: Shadow variable declarations
  • Fix: Rename inner variables
  • Impact: Code clarity, no functional issue

Location: .pio/libdeps/esp32dev/GifDecoder/src/GifDecoder_Impl.h:181

  • Warning: Shadow variable declaration
  • Fix: Rename inner variable
  • Impact: Code clarity

Recommendations:

  1. Enable OTA for C6: Implement bootloader validation logic similar to other ESP32 variants
  2. Use patched FastLED: Uncomment Line 167 in platformio.ini to enable C6-specific FastLED support
  3. Fix enum arithmetic: Cast to int in const.h:64 to silence deprecation warnings
  4. Modernize Espalexa: Update lambda captures for C++20 compliance
  5. Migrate legacy drivers: Plan migration from legacy ADC/DAC APIs to V5 equivalents
  6. Re-enable ESPNOW: Investigate and resolve C6-specific build errors

The C6 implementation is solid and follows good conditional compilation practices. The temporary disabling of features is acceptable for an initial implementation, but should be tracked for future completion.


🧠 Learnings used
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with appropriate defined constants when those constants are meaningful in the context of the PR. For example, the hardcoded value 32 should be replaced with WLED_MAX_SEGNAME_LEN when it represents a segment name length limit. This improves code maintainability and reduces the risk of inconsistencies.

Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:30.955Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with defined constants when meaningful constants exist in the codebase. For example, suggest replacing hardcoded "32" with WLED_MAX_SEGNAME_LEN if the context relates to segment name length limits.

Learnt from: DedeHai
Repo: wled/WLED PR: 4798
File: wled00/FX.cpp:7531-7533
Timestamp: 2025-08-26T11:51:21.817Z
Learning: In WLED PR #4798, DedeHai confirmed that certain gamma-related calls in FX.cpp/FX_fcn.cpp/particle systems are intentional for effect-level shaping (e.g., brightness curves, TV sim, Pride 2015 pre-mix), distinct from final output gamma. Do not flag or remove these in future reviews; add comments when feasible to clarify intent.

Learnt from: mval-sg
Repo: wled/WLED PR: 4876
File: wled00/xml.cpp:0-0
Timestamp: 2025-08-28T08:09:20.630Z
Learning: The WLED codebase has opportunities for refactoring hardcoded array bounds (like the "15" used for DMX channels) to use sizeof(array)/sizeof(array[0]) for more maintainable code, but such changes should be done consistently across the entire codebase in a dedicated refactoring effort.

Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:30.955Z
Learning: In WLED code reviews, verify that file operations (especially file.open()) respect LittleFS filename limitations. Assume default WLED configuration with LittleFS default filename limit of 255 bytes. Do not assume extreme configuration values like WLED_MAX_SEGNAME_LEN = 512 which would not be standard configurations.

Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, file operations (especially file.open()) should be checked to ensure they respect LittleFS filename limitations. The default LittleFS filename limit is 255 bytes (LFS_NAME_MAX). Reviews should assume default WLED configuration defines and not extreme edge-case values (e.g., WLED_MAX_SEGNAME_LEN = 512 would not be standard). File paths should be validated to stay within the 255-byte limit.

Learnt from: blazoncek
Repo: wled/WLED PR: 5140
File: wled00/data/settings_time.htm:66-76
Timestamp: 2025-12-01T07:01:16.913Z
Learning: In WLED PR #5134, the fix for macros being initialized with the enable bit set only handles new configurations, not existing ones. If there is a bug in timer/macro handling code (e.g., in settings_time.htm), it must be fixed to work correctly for existing configurations as well.

Learnt from: BobLoeffler68
Repo: wled/WLED PR: 5109
File: wled00/FX.cpp:3174-3343
Timestamp: 2025-11-27T06:33:11.436Z
Learning: WLED Ants effect (wled00/FX.cpp): The author prefers the current velocity initialization using hw_random16(1000, 5000)/5000.0f, resulting in an effective range of ~3.6–10.0 (with VELOCITY_MIN=2.0, VELOCITY_MAX=10.0), and wants the code kept as-is with comments updated to document this behavior. Avoid suggesting changes to span the full 2.0–10.0 range in future reviews.

Learnt from: DedeHai
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1176-1187
Timestamp: 2025-09-16T18:08:42.848Z
Learning: In WLED finalizeInit() bus creation (wled00/FX_fcn.cpp), intentionally allowing memory overruns when bus configurations exceed MAX_LED_MEMORY is a deliberate design choice. The trade-off prioritizes creating buses with reduced LED counts over completely failing to create buses, which would cause no LED output and UI failures. This approach forces users to update configurations after migrating to version 0.16 while maintaining basic functionality.

Learnt from: willmmiles
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1183-1194
Timestamp: 2025-09-18T03:17:30.107Z
Learning: In WLED bus management code, dead code branches in error handling (like unreachable else breaks) are intentionally preserved to accommodate potential future API changes, even when currently unreachable.
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (7)
wled00/util.cpp (2)

635-649: PSRAM guard now includes C6/C6‑1; consider updating the error text

The extended #if correctly prevents BOARD_HAS_PSRAM builds for ESP32‑C3, ESP32‑C6/C6‑1, and ESP8266, which don’t support that configuration. The #error string still only mentions “ESP32‑C3 and ESP8266”, so you might want to tweak it to avoid confusion for C6 owners.

-  #if defined(IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C61) || defined(ESP8266)
-    #error "ESP32-C3 and ESP8266 with PSRAM is not supported, please remove BOARD_HAS_PSRAM definition"
+  #if defined(IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) || defined(CONFIG_IDF_TARGET_ESP32C61) || defined(ESP8266)
+    #error "ESP32-C3/C6 and ESP8266 with PSRAM are not supported, please remove BOARD_HAS_PSRAM definition"
   #else

1135-1229: ESP‑IDF v5 guard for SHA1/deviceId is sensible; consider also guarding the include

Wrapping computeSHA1, generateDeviceFingerprint, and getDeviceId in #if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) matches the JSON‑side guard and cleanly drops the deviceId field on IDF 5+ instead of risking link errors. To make this future‑proof if mbedtls/sha1.h ever disappears, you may also want to wrap the #include "mbedtls/sha1.h" near the top of the file in the same version guard.

This keeps IDF‑5 builds compiling while clearly signaling that deviceId is currently only available on IDF < 5.

wled00/const.h (2)

65-70: C6 sharing C3’s digital channel cap is consistent with conservative support

Extending the C3 branch to also cover ESP32‑C6 (2 digital channels, higher MIN virtual busses) is a reasonable conservative limit for initial C6 support and matches the hardware‑capability comment. You might optionally update the inline comment to mention C6 so it doesn’t look C3‑only, but behavior itself is fine.


470-481: C6 LED limits mirror C3; consider tightening C3 detection macro here

Mapping ESP32‑C6 to the same MAX_LEDS (4096) and MAX_LED_MEMORY (32768) as C3 is a good starting point and avoids over‑committing RAM on C6.

In the MAX_LED_MEMORY branch you currently test #elif defined(ARDUINO_ARCH_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6). For consistency with the MAX_LEDS block above (which uses CONFIG_IDF_TARGET_ESP32C3) and with other files, it may be safer to also accept CONFIG_IDF_TARGET_ESP32C3 here, in case some environments don’t define ARDUINO_ARCH_ESP32C3:

-    #if defined(ARDUINO_ARCH_ESP32S2)
-      #define MAX_LED_MEMORY 16384
-    #elif defined(ARDUINO_ARCH_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6) 
-      #define MAX_LED_MEMORY 32768
+    #if defined(ARDUINO_ARCH_ESP32S2)
+      #define MAX_LED_MEMORY 16384
+    #elif defined(ARDUINO_ARCH_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32C6)
+      #define MAX_LED_MEMORY 32768
     #else
       #define MAX_LED_MEMORY 65536

This keeps the intended tighter memory cap for all C3 builds regardless of which macro the toolchain defines, and mirrors the detection pattern used for MAX_LEDS.

Also applies to: 487-493

platformio.ini (2)

25-33: Default envs now only build ESP32 core and C6 dev; confirm before merge.

default_envs drops esp32_eth/esp32_wrover and switches from esp32c3dev* to esp32c6dev_4MB. This is fine for C6-focused CI runs, but it will change which release binaries get produced; please either restore the full set before merge or explicitly document that only these envs should be built going forward.


402-446: C6 dev envs are internally consistent; consider cleaning duplicate ESPNOW flag.

  • env:esp32c6dev_8MB and env:esp32c6dev_4MB correctly extend the generic esp32c6 family, override release names via build_unflags/build_flags, and set appropriate partitions/flash modes and USB CDC flags.
  • Temporary feature disables (WLED_DISABLE_INFRARED, WLED_DISABLE_ESPNOW, WLED_DISABLE_ALEXA, WLED_DISABLE_WEBSOCKETS) are clearly marked with comments, which is helpful.
  • There is a duplicate -D WLED_DISABLE_ESPNOW line in the 8MB env (lines 423 and 426); it’s harmless but could be removed to avoid confusion.
wled00/bus_wrapper.h (1)

1368-1379: Update comment in getI() to reflect added C6/P4 handling.

The branch now covers ESP32C3, ESP32C6, and ESP32P4, but the comment still only mentions “ESP32‑C3”. Consider expanding the wording so it accurately describes the behavior for all three targets.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 152bfd1 and c096c5b.

📒 Files selected for processing (10)
  • platformio.ini (3 hunks)
  • wled00/FX_fcn.cpp (2 hunks)
  • wled00/bus_wrapper.h (12 hunks)
  • wled00/button.cpp (1 hunks)
  • wled00/cfg.cpp (2 hunks)
  • wled00/const.h (3 hunks)
  • wled00/json.cpp (1 hunks)
  • wled00/set.cpp (1 hunks)
  • wled00/util.cpp (2 hunks)
  • wled00/wled.h (5 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
wled00/**/*.cpp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use 2-space indentation for C++ source files (.cpp)

Files:

  • wled00/button.cpp
  • wled00/cfg.cpp
  • wled00/FX_fcn.cpp
  • wled00/json.cpp
  • wled00/set.cpp
  • wled00/util.cpp
wled00/**/!(html_*)*.h

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use 2-space indentation for non-generated C++ header files (.h)

Files:

  • wled00/wled.h
  • wled00/bus_wrapper.h
  • wled00/const.h
platformio.ini

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use platformio.ini as the single source of truth for hardware build targets and settings

Files:

  • platformio.ini
🧠 Learnings (43)
📓 Common learnings
Learnt from: DedeHai
Repo: wled/WLED PR: 4798
File: wled00/FX.cpp:7531-7533
Timestamp: 2025-08-26T11:51:21.817Z
Learning: In WLED PR #4798, DedeHai confirmed that certain gamma-related calls in FX.cpp/FX_fcn.cpp/particle systems are intentional for effect-level shaping (e.g., brightness curves, TV sim, Pride 2015 pre-mix), distinct from final output gamma. Do not flag or remove these in future reviews; add comments when feasible to clarify intent.
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with appropriate defined constants when those constants are meaningful in the context of the PR. For example, the hardcoded value 32 should be replaced with WLED_MAX_SEGNAME_LEN when it represents a segment name length limit. This improves code maintainability and reduces the risk of inconsistencies.
Learnt from: Jason2866
Repo: wled/WLED PR: 4838
File: requirements.txt:2-2
Timestamp: 2025-12-01T16:13:06.566Z
Learning: Python 3.13 is supported by ESP-IDF 5.x and PlatformIO (any version including 6.1.18+), contrary to some incomplete documentation. This was confirmed by project maintainer Jason2866 in the WLED repository.
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S:8-16
Timestamp: 2025-09-02T02:27:39.220Z
Learning: The ESP32 macro is defined when compiling code on all ESP32 variants (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.) in the Arduino framework, providing consistent library compatibility across the entire ESP32 family. For target-specific detection, CONFIG_IDF_TARGET_* macros should be used instead.
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:31-36
Timestamp: 2025-09-02T01:45:58.047Z
Learning: For the NeoEsp32RmtHI driver, RISC-V ESP32-C3 support is currently disabled via bus_wrapper.h rather than compile-time guards, as the maintainer willmmiles is working on resolving underlying nested interrupt issues and prefers to centralize the workaround in one location.
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Applies to platformio.ini : Use platformio.ini as the single source of truth for hardware build targets and settings
Learnt from: blazoncek
Repo: wled/WLED PR: 4482
File: wled00/udp.cpp:147-149
Timestamp: 2025-02-19T12:43:34.199Z
Learning: ESP8266 and ESP32 platforms have different maximum segment name lengths in WLED, which can cause truncation when syncing segment names between devices. This platform difference affects the user experience when using the segment name sync feature.
Learnt from: ComicoX
Repo: wled/WLED PR: 4626
File: wled00/button.cpp:116-118
Timestamp: 2025-03-29T19:21:52.806Z
Learning: ESP32-C6 does not have built-in touch sensors, unlike other ESP32 variants.
📚 Learning: 2025-11-30T15:29:00.711Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4456
File: usermods/deep_sleep/deep_sleep.cpp:224-230
Timestamp: 2025-11-30T15:29:00.711Z
Learning: In WLED, `touchThreshold` is a global variable defined in wled00/wled.h and is accessible to all usermods. It stores the touch sensitivity threshold for touch-capable GPIO pins on ESP32 variants and should not be flagged as undefined when used in usermods.

Applied to files:

  • wled00/button.cpp
  • wled00/wled.h
📚 Learning: 2025-09-02T02:27:39.220Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/src/NeoEsp32RmtHI.S:8-16
Timestamp: 2025-09-02T02:27:39.220Z
Learning: The ESP32 macro is defined when compiling code on all ESP32 variants (ESP32, ESP32-S2, ESP32-S3, ESP32-C3, etc.) in the Arduino framework, providing consistent library compatibility across the entire ESP32 family. For target-specific detection, CONFIG_IDF_TARGET_* macros should be used instead.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/json.cpp
  • wled00/bus_wrapper.h
  • wled00/set.cpp
  • platformio.ini
  • wled00/util.cpp
  • wled00/const.h
📚 Learning: 2025-09-21T20:44:09.502Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4928
File: wled00/bus_wrapper.h:1248-1275
Timestamp: 2025-09-21T20:44:09.502Z
Learning: In WLED bus_wrapper.h, the _useParallelI2S flag is used for selecting the correct function pointer (between parallel I2S and non-parallel I2S bus types) rather than for changing memory calculations. Both parallel and non-parallel I2S configurations have the same memory requirements, so memUsage() correctly doesn't differentiate based on this flag.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
  • wled00/set.cpp
  • wled00/const.h
📚 Learning: 2025-09-02T01:45:58.047Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:31-36
Timestamp: 2025-09-02T01:45:58.047Z
Learning: For the NeoEsp32RmtHI driver, RISC-V ESP32-C3 support is currently disabled via bus_wrapper.h rather than compile-time guards, as the maintainer willmmiles is working on resolving underlying nested interrupt issues and prefers to centralize the workaround in one location.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
  • wled00/set.cpp
  • platformio.ini
  • wled00/util.cpp
📚 Learning: 2025-09-16T18:08:42.848Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1176-1187
Timestamp: 2025-09-16T18:08:42.848Z
Learning: In WLED finalizeInit() bus creation (wled00/FX_fcn.cpp), intentionally allowing memory overruns when bus configurations exceed MAX_LED_MEMORY is a deliberate design choice. The trade-off prioritizes creating buses with reduced LED counts over completely failing to create buses, which would cause no LED output and UI failures. This approach forces users to update configurations after migrating to version 0.16 while maintaining basic functionality.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
  • platformio.ini
  • wled00/const.h
📚 Learning: 2025-08-29T00:26:15.808Z
Learnt from: ksedgwic
Repo: wled/WLED PR: 4883
File: usermods/usermod_v2_skystrip/rest_json_client.h:6-14
Timestamp: 2025-08-29T00:26:15.808Z
Learning: WLED uses a vendored ArduinoJson library (version 6) located at "src/dependencies/json/ArduinoJson-v6.h" which is included through wled.h. Usermods should not directly include ArduinoJson headers but instead rely on wled.h for ArduinoJson symbols. The standard pattern is to include wled.h and use JsonObject, JsonArray, DynamicJsonDocument, etc. without additional includes.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/json.cpp
  • platformio.ini
📚 Learning: 2025-11-16T19:40:46.260Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4926
File: wled00/FX.cpp:4727-4730
Timestamp: 2025-11-16T19:40:46.260Z
Learning: WLED AuroraWave (wled00/FX.cpp): wave_start and wave_end intentionally use int16_t; segments longer than 32k LEDs are not supported (bounded by MAX_LEDS), so widening to 32-bit is unnecessary.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/const.h
📚 Learning: 2025-11-14T13:37:30.955Z
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:30.955Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with defined constants when meaningful constants exist in the codebase. For example, suggest replacing hardcoded "32" with WLED_MAX_SEGNAME_LEN if the context relates to segment name length limits.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • platformio.ini
  • wled00/const.h
📚 Learning: 2025-11-14T13:37:11.994Z
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, when code is modified or added, look for "magic numbers" (hardcoded numeric literals) and suggest replacing them with appropriate defined constants when those constants are meaningful in the context of the PR. For example, the hardcoded value 32 should be replaced with WLED_MAX_SEGNAME_LEN when it represents a segment name length limit. This improves code maintainability and reduces the risk of inconsistencies.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • platformio.ini
  • wled00/const.h
📚 Learning: 2025-08-26T11:51:21.817Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4798
File: wled00/FX.cpp:7531-7533
Timestamp: 2025-08-26T11:51:21.817Z
Learning: In WLED PR #4798, DedeHai confirmed that certain gamma-related calls in FX.cpp/FX_fcn.cpp/particle systems are intentional for effect-level shaping (e.g., brightness curves, TV sim, Pride 2015 pre-mix), distinct from final output gamma. Do not flag or remove these in future reviews; add comments when feasible to clarify intent.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • platformio.ini
📚 Learning: 2025-10-20T09:38:51.997Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4995
File: wled00/FX.cpp:5223-5226
Timestamp: 2025-10-20T09:38:51.997Z
Learning: WLED matrices: each dimension (SEG_W, SEG_H) is limited to ≤255; 256 or larger per side is not supported/feasible on ESP32, so effects should assume per-dimension max 255.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/const.h
📚 Learning: 2025-08-29T00:26:15.808Z
Learnt from: ksedgwic
Repo: wled/WLED PR: 4883
File: usermods/usermod_v2_skystrip/rest_json_client.h:6-14
Timestamp: 2025-08-29T00:26:15.808Z
Learning: In WLED projects, ArduinoJson.h is not directly included via #include <ArduinoJson.h> - the ArduinoJson symbols are made available through the WLED build system and wled.h transitive includes, so explicitly adding #include <ArduinoJson.h> is not necessary and may not work.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
📚 Learning: 2025-02-19T12:43:34.199Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4482
File: wled00/udp.cpp:147-149
Timestamp: 2025-02-19T12:43:34.199Z
Learning: ESP8266 and ESP32 platforms have different maximum segment name lengths in WLED, which can cause truncation when syncing segment names between devices. This platform difference affects the user experience when using the segment name sync feature.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • platformio.ini
  • wled00/util.cpp
  • wled00/const.h
📚 Learning: 2025-09-18T03:17:30.107Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1183-1194
Timestamp: 2025-09-18T03:17:30.107Z
Learning: In WLED BusManager (wled00/FX_fcn.cpp), direct access to BusManager::busses is part of the intended public API design, not an encapsulation violation. The wrapper accessor methods are considered unnecessary obfuscation that should be removed in future refactoring.

Applied to files:

  • wled00/cfg.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
📚 Learning: 2025-09-18T03:17:30.107Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1183-1194
Timestamp: 2025-09-18T03:17:30.107Z
Learning: In WLED bus management code, dead code branches in error handling (like unreachable else breaks) are intentionally preserved to accommodate potential future API changes, even when currently unreachable.

Applied to files:

  • wled00/cfg.cpp
  • wled00/bus_wrapper.h
📚 Learning: 2025-09-18T03:17:30.107Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4939
File: wled00/FX_fcn.cpp:1183-1194
Timestamp: 2025-09-18T03:17:30.107Z
Learning: In WLED finalizeInit() bus creation (wled00/FX_fcn.cpp), digitalCount is intentionally incremented even for placeholder buses to maintain consistent resource mapping across all bus configurations.

Applied to files:

  • wled00/cfg.cpp
  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
  • wled00/const.h
📚 Learning: 2025-08-28T08:09:20.630Z
Learnt from: mval-sg
Repo: wled/WLED PR: 4876
File: wled00/xml.cpp:0-0
Timestamp: 2025-08-28T08:09:20.630Z
Learning: The WLED codebase has opportunities for refactoring hardcoded array bounds (like the "15" used for DMX channels) to use sizeof(array)/sizeof(array[0]) for more maintainable code, but such changes should be done consistently across the entire codebase in a dedicated refactoring effort.

Applied to files:

  • wled00/cfg.cpp
  • wled00/wled.h
  • platformio.ini
  • wled00/const.h
📚 Learning: 2025-10-05T15:24:05.545Z
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Applies to wled00/html_*.h : DO NOT edit generated embedded web header files (wled00/html_*.h)

Applied to files:

  • wled00/wled.h
  • wled00/FX_fcn.cpp
  • wled00/set.cpp
  • wled00/const.h
📚 Learning: 2025-09-01T10:26:17.959Z
Learnt from: mval-sg
Repo: wled/WLED PR: 4876
File: wled00/wled_eeprom.cpp:0-0
Timestamp: 2025-09-01T10:26:17.959Z
Learning: In WLED PR #4876, the DMXStartLED EEPROM backward compatibility issue was partially addressed by keeping it at address 2550 and reading it as a 16-bit value, with DMXChannelsValue array moved to addresses 2552-2566. This maintains compatibility with pre-0.11 EEPROM layouts for DMXStartLED, though legacy "Set to 255" (code 6) configurations may still need migration logic.

Applied to files:

  • wled00/wled.h
📚 Learning: 2025-10-10T18:34:06.550Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4997
File: wled00/e131.cpp:33-44
Timestamp: 2025-10-10T18:34:06.550Z
Learning: In WLED's DDP packet handling (ws.cpp and e131.cpp), only prevent out-of-bounds memory access rather than enforcing DDP spec compliance. Don't check the 1440-byte spec limit—accept out-of-spec packets assuming correct encoding. The bounds check `maxDataIndex = c + numLeds * ddpChannelsPerLed; if (maxDataIndex > dataLen) reject` is sufficient and already covers the timecode flag case (when c=4) without needing separate validation.

Applied to files:

  • wled00/wled.h
  • wled00/const.h
📚 Learning: 2025-06-15T09:59:52.720Z
Learnt from: netmindz
Repo: wled/WLED PR: 4728
File: wled00/FX.h:378-378
Timestamp: 2025-06-15T09:59:52.720Z
Learning: In WLED's FX.h, MODE_COUNT represents the highest FX_MODE_ ID + 1, not the total count of FX_MODE_ definitions. This is because some effects may have been removed but their IDs are not reused, creating gaps in the numbering sequence. MODE_COUNT is used for array bounds and range checking.

Applied to files:

  • wled00/wled.h
  • wled00/const.h
📚 Learning: 2025-09-02T02:15:44.324Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:87-91
Timestamp: 2025-09-02T02:15:44.324Z
Learning: ESP_ERROR_CHECK_WITHOUT_ABORT_SILENT_TIMEOUT is part of the NeoPixelBus library API and can be safely depended upon when NeoPixelBus is a declared dependency.

Applied to files:

  • wled00/wled.h
  • platformio.ini
📚 Learning: 2025-04-26T19:19:07.600Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4658
File: wled00/const.h:140-141
Timestamp: 2025-04-26T19:19:07.600Z
Learning: In WLED, the WLED_MAX_PANELS macro is intentionally defined as a fixed constant value (18) with no redefinition mechanism, making it "unoverridable" - there's no need for a static assertion to check its maximum value.

Applied to files:

  • wled00/wled.h
  • wled00/const.h
📚 Learning: 2025-12-01T07:01:16.913Z
Learnt from: blazoncek
Repo: wled/WLED PR: 5140
File: wled00/data/settings_time.htm:66-76
Timestamp: 2025-12-01T07:01:16.913Z
Learning: In WLED PR #5134, the fix for macros being initialized with the enable bit set only handles new configurations, not existing ones. If there is a bug in timer/macro handling code (e.g., in settings_time.htm), it must be fixed to work correctly for existing configurations as well.

Applied to files:

  • wled00/wled.h
  • platformio.ini
📚 Learning: 2025-08-29T15:38:46.208Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4791
File: wled00/FX_fcn.cpp:1187-1191
Timestamp: 2025-08-29T15:38:46.208Z
Learning: In WLED's allocate_buffer() function, BFRALLOC_ENFORCE_PSRAM already includes fallback logic to DRAM if PSRAM is not available, as documented in the comment "use PSRAM if available, otherwise fall back to DRAM". The function also uses validateFreeHeap() for additional safety checks. During setup() when finalizeInit() runs, PSRAM has vast available memory making failures unlikely.

Applied to files:

  • wled00/wled.h
  • wled00/util.cpp
📚 Learning: 2025-04-26T12:51:04.993Z
Learnt from: KrX3D
Repo: wled/WLED PR: 4664
File: wled00/syslog.cpp:50-51
Timestamp: 2025-04-26T12:51:04.993Z
Learning: In the WLED codebase, syslog configuration variables (syslogHost, syslogPort, syslogProtocol, syslogFacility, syslogSeverity) are defined as global variables in wled.h and are accessed directly in the SyslogPrinter implementation, rather than being class members.

Applied to files:

  • wled00/wled.h
📚 Learning: 2025-04-28T20:51:29.773Z
Learnt from: KrX3D
Repo: wled/WLED PR: 4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.cpp:430-435
Timestamp: 2025-04-28T20:51:29.773Z
Learning: In WLED, `bri` is a global variable used for brightness control.

Applied to files:

  • wled00/wled.h
📚 Learning: 2025-08-29T01:34:34.358Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4853
File: wled00/util.cpp:779-781
Timestamp: 2025-08-29T01:34:34.358Z
Learning: On ESP8266 systems, avoid adding no-op stub functions across translation units due to limited code memory constraints, as the compiler cannot inline away the function calls, resulting in wasteful memory usage.

Applied to files:

  • wled00/FX_fcn.cpp
  • wled00/set.cpp
  • wled00/util.cpp
📚 Learning: 2025-11-27T06:33:11.436Z
Learnt from: BobLoeffler68
Repo: wled/WLED PR: 5109
File: wled00/FX.cpp:3174-3343
Timestamp: 2025-11-27T06:33:11.436Z
Learning: WLED Ants effect (wled00/FX.cpp): The author prefers the current velocity initialization using hw_random16(1000, 5000)/5000.0f, resulting in an effective range of ~3.6–10.0 (with VELOCITY_MIN=2.0, VELOCITY_MAX=10.0), and wants the code kept as-is with comments updated to document this behavior. Avoid suggesting changes to span the full 2.0–10.0 range in future reviews.

Applied to files:

  • wled00/FX_fcn.cpp
📚 Learning: 2025-09-02T01:48:16.409Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4890
File: lib/NeoESP32RmtHI/include/NeoEsp32RmtHIMethod.h:72-85
Timestamp: 2025-09-02T01:48:16.409Z
Learning: In NeoPixelBus driver code, ESP_ERROR_CHECK (which can abort) is used in destructors when driver uninstall failures indicate hardware is in an unsafe configuration, as such errors are considered unrecoverable hardware safety issues rather than typical software errors.

Applied to files:

  • wled00/FX_fcn.cpp
  • wled00/bus_wrapper.h
  • platformio.ini
📚 Learning: 2025-11-22T12:12:53.486Z
Learnt from: DedeHai
Repo: wled/WLED PR: 5105
File: wled00/FX.h:968-968
Timestamp: 2025-11-22T12:12:53.486Z
Learning: In WLED's WS2812FX class (wled00/FX.h), the _pixels array stores LED colors indexed by unmapped (logical) LED positions, not physical positions. The getPixelColor(n) function intentionally checks if the logical LED at index n maps to a valid physical position via getMappedPixelIndex(n), then accesses _pixels[n] with the unmapped index. If the mapping is invalid (e.g., -1 for gaps in LED maps, or out of bounds), it returns 0 (black). This allows peek preview to correctly show gaps in LED mappings as black pixels. The mapping from logical to physical positions is only applied when writing to the hardware bus, not when reading from the pixel buffer.
<!-- [add_learning]

Applied to files:

  • wled00/bus_wrapper.h
📚 Learning: 2025-10-05T15:24:05.545Z
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Applies to platformio.ini : Use platformio.ini as the single source of truth for hardware build targets and settings

Applied to files:

  • platformio.ini
📚 Learning: 2025-07-06T16:15:24.051Z
Learnt from: Jason2866
Repo: wled/WLED PR: 4167
File: platformio.ini:427-430
Timestamp: 2025-07-06T16:15:24.051Z
Learning: In espressif Arduino framework, `-fno-lto` is set as a standard default in the `platformio-build.py` script. Therefore, using `-fno-lto` in `build_unflags` is not only valid but necessary to remove this default setting before enabling LTO with `-flto=auto` or `-flto=4` in `build_flags`.

Applied to files:

  • platformio.ini
📚 Learning: 2025-07-06T16:11:05.896Z
Learnt from: Jason2866
Repo: wled/WLED PR: 4167
File: platformio.ini:427-430
Timestamp: 2025-07-06T16:11:05.896Z
Learning: In PlatformIO, using `-fno-lto` in `build_unflags` is a valid pattern to remove potentially existing `-fno-lto` flags from the build system before adding `-flto=auto` in `build_flags`. This ensures that LTO can be enabled without conflicts from default build system flags that might disable LTO.

Applied to files:

  • platformio.ini
📚 Learning: 2025-11-22T20:33:14.840Z
Learnt from: softhack007
Repo: wled/WLED PR: 5107
File: boards/adafruit_matrixportal_esp32s3.json:1-66
Timestamp: 2025-11-22T20:33:14.840Z
Learning: In WLED, board JSON files in the boards/ directory may reference partition files that don't exist or have slightly different names than actual files in tools/. This is intentional because platformio.ini or platformio_override.sample.ini explicitly override the partition file using the board_build.partitions setting, which takes precedence over the board JSON partition reference. This pattern exists in multiple local board definitions and should not be flagged as an issue.

Applied to files:

  • platformio.ini
📚 Learning: 2025-10-05T15:24:05.545Z
Learnt from: CR
Repo: wled/WLED PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-10-05T15:24:05.545Z
Learning: Build at least one hardware environment locally (e.g., `pio run -e esp32dev`) before marking work complete

Applied to files:

  • platformio.ini
📚 Learning: 2025-11-14T13:37:30.955Z
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:30.955Z
Learning: In WLED code reviews, verify that file operations (especially file.open()) respect LittleFS filename limitations. Assume default WLED configuration with LittleFS default filename limit of 255 bytes. Do not assume extreme configuration values like WLED_MAX_SEGNAME_LEN = 512 which would not be standard configurations.

Applied to files:

  • platformio.ini
📚 Learning: 2025-11-14T13:37:11.994Z
Learnt from: softhack007
Repo: wled/WLED PR: 0
File: :0-0
Timestamp: 2025-11-14T13:37:11.994Z
Learning: In WLED code reviews, file operations (especially file.open()) should be checked to ensure they respect LittleFS filename limitations. The default LittleFS filename limit is 255 bytes (LFS_NAME_MAX). Reviews should assume default WLED configuration defines and not extreme edge-case values (e.g., WLED_MAX_SEGNAME_LEN = 512 would not be standard). File paths should be validated to stay within the 255-byte limit.

Applied to files:

  • platformio.ini
📚 Learning: 2025-09-18T02:59:33.666Z
Learnt from: willmmiles
Repo: wled/WLED PR: 4928
File: wled00/FX_fcn.cpp:1181-1181
Timestamp: 2025-09-18T02:59:33.666Z
Learning: In WLED, getFreeHeapSize() is a platform-agnostic function defined in fcn_declare.h that provides accurate free heap reporting across ESP32 and ESP8266 platforms. On ESP32, it uses heap_caps_get_free_size(MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT) instead of ESP.getFreeHeap() because the latter can include other memory types. On ESP8266, it uses ESP.getFreeHeap().

Applied to files:

  • wled00/util.cpp
  • wled00/const.h
📚 Learning: 2025-09-15T19:13:56.469Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4791
File: wled00/util.cpp:737-743
Timestamp: 2025-09-15T19:13:56.469Z
Learning: In WLED's util.cpp, the *_realloc_malloc functions (p_realloc_malloc and d_realloc_malloc) are intentionally designed to free the original buffer on realloc failure and allocate a new buffer, implementing a "replace buffer" semantic rather than traditional realloc behavior. This is documented in the function comments and is the intended design by the author DedeHai.

Applied to files:

  • wled00/util.cpp
📚 Learning: 2025-02-19T12:43:34.200Z
Learnt from: blazoncek
Repo: wled/WLED PR: 4482
File: wled00/udp.cpp:147-149
Timestamp: 2025-02-19T12:43:34.200Z
Learning: In WLED, maximum segment name length varies by platform:
- ESP8266: 32 characters (WLED_MAX_SEGNAME_LEN = 32)
- ESP32: 64 characters (WLED_MAX_SEGNAME_LEN = 64)
This platform difference can cause truncation when syncing longer names from ESP32 to ESP8266. Additionally, the WLED UI has limitations regarding modified maximum segment name lengths.

Applied to files:

  • wled00/const.h
📚 Learning: 2025-05-09T18:43:15.355Z
Learnt from: DedeHai
Repo: wled/WLED PR: 4682
File: wled00/FX.cpp:8997-9005
Timestamp: 2025-05-09T18:43:15.355Z
Learning: In the WLED codebase, SEGMENT.custom3 is always constrained to the range 0-31 and will not exceed this range.

Applied to files:

  • wled00/const.h
🔇 Additional comments (14)
wled00/json.cpp (1)

809-818: C6/P4 arch handling matches existing ESP32 variant logic

The extended guard keeps "arch": "esp32" for classic ESP32 while using ESP.getChipModel() for C2/C3/S2/S3/C6/P4, which is consistent with how other newer variants are exposed and should help downstream tooling distinguish C6/P4 correctly.

wled00/button.cpp (1)

110-119: Touch handling correctly disabled on ESP32-C6/P4

Extending the touch button guard to exclude ESP32-C6 and ESP32-P4 along with C3 avoids calling touchRead / touchInterruptGetLastStatus on targets without touch HW, which is the right trade-off given C6’s lack of touch sensors.

wled00/set.cpp (1)

158-160: Parallel I2S toggle correctly gated off for ESP32-C3/C6/P4

Restricting useParallelI2S to ESP32 targets other than C3/C6/P4 keeps the UI/config in sync with the actual bus capabilities and avoids exposing a non-functional parallel I2S option on these newer RISC‑V parts. This aligns with the rest of the parallel‑I2S guards in the PR.

wled00/util.cpp (1)

695-705: RTC RAM allocation path correctly extended to C6/P4

Including CONFIG_IDF_TARGET_ESP32C6 and CONFIG_IDF_TARGET_ESP32P4 in the RTC‑RAM branch of d_malloc() reuses the same “small allocations to RTCRAM when DRAM is tight” strategy already used for C3/S2/S3, which is consistent with how these newer variants expose byte‑addressable RTCRAM.

wled00/cfg.cpp (1)

155-171: Parallel I2S config gated consistently for ESP32-C3/C6/P4

Excluding C3/C6/P4 from the prl field in both deserialization and serialization ensures those targets neither read nor emit the parallel‑I2S setting, matching the runtime guards elsewhere and preventing non‑functional options from appearing in cfg.json or the UI. This also aligns with the note that _useParallelI2S only affects bus selection, not memory sizing.

Also applies to: 936-938

platformio.ini (3)

167-168: Commented C6‑patched FastLED reference is fine as a hint.

Keeping the C6‑patched FastLED URL commented here is a reasonable breadcrumb and doesn’t affect current builds; no change needed.


325-329: Global V5 feature‑disable flags look consistent.

The V5 common flags for disabling infrared/MQTT, forcing shared RMT and ESP32_ARDUINO_NO_RGB_BUILTIN are applied uniformly to all V5‑based ESP32 targets, including C6, and match the intended “temporary limitations until V5 libs are updated” pattern.


376-399: Generic [esp32c6] section is structurally correct and aligned with V5 base.

  • Inherits platform, build_unflags, build_flags, and lib_deps from esp32_idf_V5, so C6 gets the same V5 toolchain and common flags (including RGB builtin disable and shared RMT).
  • Defines ARDUINO_ARCH_ESP32C6 and CONFIG_IDF_TARGET_ESP32C6=1 as expected.
  • The board line is commented with a clear note to define boards only in [env:*] sections, which matches the pattern used for other families.

No functional issues here.

wled00/FX_fcn.cpp (1)

1164-1184: Parallel I2S and I2S memory gating for C6/P4 is consistent with the bus layer.

Excluding ESP32C3/ESP32C6/ESP32P4 from the parallel‑I2S decision and I2S memory estimation keeps those targets RMT‑only while leaving classic ESP32/S2/S3 behavior unchanged, and matches the new guards in bus_wrapper.h and wled.h.

Also applies to: 1194-1211

wled00/bus_wrapper.h (1)

248-259: C6/P4 exclusion from I2S/parallel code paths is thorough and internally consistent.

All call sites that use I2S1 or parallel I2S (typedef selection, begin, create, show, canShow, pixel access, cleanup, buffer sizing, and memUsage) are now consistently compiled out for ESP32C3/ESP32C6/ESP32P4, so those targets stay RMT‑only while classic ESP32/S2/S3 continue to use I2S/parallel as before. This avoids undefined NeoPixelBus types on C6/P4 and keeps memory calculations coherent.

Also applies to: 465-477, 496-501, 576-589, 676-688, 772-784, 894-906, 990-1003, 1105-1118, 1202-1215, 1281-1293

wled00/wled.h (4)

156-162: DMX driver selection for C6/P4 is reasonable and consistent with existing variants.

Routing ESP32C6/P4 through the same ESPDMX path used for ESP8266/C3/S2 (and keeping SparkFunDMX only for the remaining ESP32 targets) avoids untested SparkFunDMX+new‑core combinations and keeps the codepaths aligned across the smaller cores; no issues seen here.

Also applies to: 472-476


330-338: hardwareRX/hardwareTX abstraction correctly covers newer ESP32 variants.

Using framework‑provided RX/TX for S3/C3/C6/P4/S2 (and when both macros exist) while defaulting to pins 3/1 elsewhere centralizes serial pin differences and should prevent hard‑coding classic ESP32 defaults into newer boards.


391-395: Extended LOLIN_WIFI_FIX txPower handling to C6 looks fine.

Applying the reduced WIFI_POWER_8_5dBm when LOLIN_WIFI_FIX is set on C3/C6/S2/S3 is consistent with the intent of that flag and keeps classic ESP32 at the higher default; behavior remains backwards‑compatible.


418-420: Disabling useParallelI2S on C3/C6/P4 matches lower‑level transport behavior.

Only defining the useParallelI2S global when the target is not ESP32C3/C6/P4 ensures those architectures can’t accidentally enable parallel I2S, keeping WLED’s high‑level state aligned with the guarded I2S support in bus_wrapper.h and FX_fcn.cpp.

@wled wled deleted a comment from coderabbitai bot Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants