fix static IP on wired ETH - #11385
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChangesEthernet static IP configuration
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
⚡ Try this PR in the Web FlasherNote Building this pull request… the flash button, badges and supported-board |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/mesh/wifi/WiFiAPClient.cpp`:
- Around line 103-109: Change applyEthStaticIp() to return a boolean indicating
whether static Ethernet configuration is valid and successfully applied; log
failures for both ETH.config() rejection and a zero static IP. Update both
initEthernet() call sites to check this result and return false before starting
Ethernet events or services when static configuration is rejected.
- Around line 117-119: Register WiFiEvent before each ETH.begin() call,
including the W5500 initialization shown here and the other Ethernet
initialization site. Ensure applyEthStaticIp() cannot emit
ARDUINO_EVENT_ETH_GOT_IP before the handler is installed, preserving the
existing ethNetworkConnectedPending and onNetworkConnected() startup flow.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b7ec1b89-27e7-4660-8809-86c82bc0bb5c
📒 Files selected for processing (1)
src/mesh/wifi/WiFiAPClient.cpp
Summary by CodeRabbit
New Features
Bug Fixes