Skip to content
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

Add ethernet option #4575

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add ethernet option #4575

wants to merge 2 commits into from

Conversation

thirstyice
Copy link

@thirstyice thirstyice commented Feb 26, 2025

I figure I can't be the only one to do ethernet like this.

Maybe it would be worth providing a "Custom" option that allows you to set each setting individually?
Beyond the scope of this PR though.

Summary by CodeRabbit

  • New Features
    • Introduced a new "Thirstyice" option in the Ethernet type selector to expand connectivity choices.
    • Added an enhanced network configuration for connecting via the "Thirstyice" interface.
    • Increased the number of supported Ethernet board types from 13 to 14.

I figure I can't be the only one to do ethernet like this
Copy link

coderabbitai bot commented Feb 26, 2025

Walkthrough

The pull request introduces changes to Ethernet configuration in three files. In the HTML file settings_wifi.htm, a new option labeled "Thirstyice" (with a value of 13) is added to the Ethernet type dropdown, accompanied by a minor formatting adjustment. The C++ file network.cpp sees the addition of a new entry for Thirstyice's Ethernet hookup in the ethernetBoards array, specifying various parameters, while also removing trailing spaces in comments. The const.h file is updated to reflect an increase in the number of supported Ethernet types and the introduction of a new constant for Thirstyice.

Changes

Files Change Summary
wled00/data/settings_wifi.htm Added <option value="13">Thirstyice</option> to the Ethernet type dropdown and removed an extra space after select.remove();.
wled00/network.cpp Removed trailing spaces in comments and added a new ethernet board entry for "Thirstyice's ethernet hookup" with parameters: (1, -1, 23, 18, ETH_PHY_LAN8720, ETH_CLOCK_GPIO0_OUT).
wled00/const.h Updated #define WLED_NUM_ETH_TYPES from 13 to 14 and added #define WLED_ETH_THIRSTYICE 13.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b357999 and b3cc62a.

📒 Files selected for processing (1)
  • wled00/const.h (2 hunks)
🔇 Additional comments (2)
wled00/const.h (2)

374-374: Increment to WLED_NUM_ETH_TYPES looks correct.

The constant is properly updated to accommodate the new Ethernet board type being added.


389-389: New Ethernet board type definition looks good.

The constant for the new "Thirstyice" Ethernet board type follows the existing naming convention and continues the sequential numbering pattern (value 13) from the previous board types.

✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@netmindz
Copy link
Member

Can you include a link to the board this relates to? I had as quick Google and couldn't find it

@thirstyice
Copy link
Author

It's not a purchasable board (yet - I'm working on it), but it's the way I often hook up phy boards such as this one to my esp32 dev board

@thirstyice thirstyice marked this pull request as draft February 26, 2025 18:34
@thirstyice
Copy link
Author

thirstyice commented Feb 26, 2025

There's still a little work for me to do - for me, the ethernet connects then immediately disconnects. Need to figure out if the problem is hardware or software.

Edit: Twas a hardware issue

@thirstyice thirstyice marked this pull request as ready for review February 26, 2025 19:21
@netmindz
Copy link
Member

Adding an option for a bespoke board doesn't make sense

@blazoncek
Copy link
Collaborator

Why did you choose GPIO0 and not GPIO17 as some of the existing boards?

@thirstyice
Copy link
Author

Why did you choose GPIO0 and not GPIO17 as some of the existing boards?

So I could use GPIO17 for LED output.

Adding an option for a bespoke board doesn't make sense

Many of the options that already exist are for community-created boards. Where is the line between those and mine? Where does one need to get to in development before a "bespoke" board becomes a board that is worth including?

I feel like the real solution is to add a "custom" option that lets users define the gpios as they like for when people use dev boards, but I don't know how to do that and I do know how to do this, so this is what I've got.

Anyway, if you don't want to include this then feel free to close it. I just figured that someone else might be frustrated like me with not having an option for their hookup. I can always just keep compiling my own fork though.

@blazoncek
Copy link
Collaborator

So I could use GPIO17 for LED output.

You can use GPIO0 for LED output as well.

I feel like the real solution is to add a "custom" option that lets users define the gpios as they like

Tell that to not so tech savvy people. But if you insist, why not make a PR?

Anyway, if you don't want to include this then feel free to close it.

Adding another (and another and another etc) board, just because someone decided to use different GPIO than others (without proper justification) is problematic as it eats away precious flash memory. That does not mean the PR is worthless or should be closed without merging. I am just trying to get justification why this choice?

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