8000 Update crude parallel I2S detection by willmmiles · Pull Request #4713 · wled/WLED · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update crude parallel I2S detection #4713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 14, 2025

Conversation

willmmiles
Copy link
Member
@willmmiles willmmiles commented Jun 7, 2025

My ESP32s are reporting a maximum of 32 buses, so the parallel I2s tickbox was missing from the LED settings UI.

Summary by CodeRabbit

  • Bug Fixes
    • Improved hardware detection logic for ESP32 boards in the LED settings interface, ensuring more accurate display and configuration options for supported devices.

My ESP32s are now reporting a maximum of 32 buses.
Copy link
Contributor
coderabbitai bot commented Jun 7, 2025

Walkthrough

The conditional logic in the UI() function within the settings_leds.htm file was updated. The check for identifying ESP32 boards was changed from comparing oMaxB to 19 to comparing it to 32. The logic for S2 and S3 board detection remains unchanged.

Changes

File(s) Change Summary
wled00/data/settings_leds.htm Modified conditional in UI() to check oMaxB == 32 instead of oMaxB == 19 for ESP32 board logic.

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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 8b65d87 and ab28b6d.

📒 Files selected for processing (1)
  • wled00/data/settings_leds.htm (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_16MB_opi)
  • GitHub Check: wled_build / Build Environments (usermods)
  • GitHub Check: wled_build / Build Environments (esp32dev_V4)
  • GitHub Check: wled_build / Build Environments (esp32_wrover)
  • GitHub Check: wled_build / Build Environments (esp32s3_4M_qspi)
  • GitHub Check: wled_build / Build Environments (esp32_eth)
  • GitHub Check: wled_build / Build Environments (lolin_s2_mini)
  • GitHub Check: wled_build / Build Environments (esp32s3dev_8MB_opi)
  • GitHub Check: wled_build / Build Environments (esp01_1m_full_compat)
  • GitHub Check: wled_build / Build Environments (esp32c3dev)
  • GitHub Check: wled_build / Build Environments (nodemcuv2_compat)
  • GitHub Check: wled_build / Build Environments (esp32dev)
  • GitHub Check: wled_build / Build Environments (esp8266_2m_compat)
  • GitHub Check: wled_build / Build Environments (esp01_1m_full)
  • GitHub Check: wled_build / Build Environments (esp8266_2m_160)
  • GitHub Check: wled_build / Build Environments (nodemcuv2_160)
  • GitHub Check: wled_build / Build Environments (nodemcuv2)
  • GitHub Check: wled_build / Build Environments (e 8000 sp01_1m_full_160)
  • GitHub Check: wled_build / Build Environments (esp8266_2m)
  • GitHub Check: wled_build / Test cdata.js

@@ -353,7 +353,7 @@
});
const S2 = (oMaxB == 14) && (maxV == 4);
const S3 = (oMaxB == 14) && (maxV == 6);
if (oMaxB == 19 || S2 || S3) { // TODO: crude ESP32 & S2/S3 detection
if (oMaxB == 32 || S2 || S3) { // TODO: crude ESP32 & S2/S3 detection
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

LGTM! Change correctly updates ESP32 detection for parallel I2S.

This change appropriately addresses the issue where ESP32 devices reporting 32 buses were missing the parallel I2S checkbox. The S2/S3 detection logic remains unchanged.

However, please verify backward compatibility and update the related comment inconsistency:

  1. Backward compatibility concern: If older ESP32 firmware/hardware still reports oMaxB == 19, those devices would lose the parallel I2S option. Please confirm that all target ESP32 devices now report 32 buses.

  2. Comment inconsistency: The comment in the bLimits function (line 46) states "20 - ESP32" for maxB, but the actual detection values have been 19 (old) and now 32 (new). Please update this comment to reflect the correct value.


🏁 Script executed:

#!/bin/bash
# Description: Check for other references to ESP32 bus counts to ensure consistency
# Expected: Find any hardcoded values or comments that might need updating

# Search for potential ESP32 bus count references
rg -i "esp32.*bus" -A 2 -B 2
rg "\b(19|20|32)\b.*esp32" -i -A 2 -B 2
rg "maxB.*esp32" -i -A 2 -B 2

Length of output: 6635


Ensure ESP32 detection comment is updated and handle legacy bus counts if needed

Please address the following:

  • Update the comment in wled00/data/settings_leds.htm to reflect the new “32” bus count for ESP32:

    - oMaxB = maxB = b; // maxB - max buses (can be changed if using ESP32 parallel I2S): 20 - ESP32, 14 - S3/S2, 6 - C3, 4 - 8266
    + oMaxB = maxB = b; // maxB - max buses (can be changed if using ESP32 parallel I2S): 32 - ESP32, 14 - S3/S2, 6 - C3, 4 - 8266
  • If you need to support any older ESP32 variants still reporting 19 buses, consider restoring a fallback in the UI logic. For example:

    if (oMaxB == 32 || oMaxB == 19 || S2 || S3) {  }
  • Confirm that all current ESP32 targets now report 32 buses and that no other hardcoded “19” or “20” bus‐count references remain.

🤖 Prompt for AI Agents
In wled00/data/settings_leds.htm at line 356, update the comment related to
ESP32 bus count to reflect the new value of 32 instead of 19 or 20.
Additionally, modify the condition to include a fallback for older ESP32 devices
that report 19 buses by changing the if statement to check for oMaxB == 32 or
oMaxB == 19 or S2 or S3. Finally, verify that no other parts of the codebase
contain hardcoded values of 19 or 20 for ESP32 bus counts and update or remove
them as necessary to ensure consistency and backward compatibility.

Copy link
Collaborator
@blazoncek blazoncek left a comment

Choose a reason for hiding this comment

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

👍

@willmmiles willmmiles merged commit 3a413a5 into wled:main Jun 14, 2025
21 checks passed
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.

2 participants
0