[Bugfix] Set missing build flag for platformio builds#418
[Bugfix] Set missing build flag for platformio builds#418
Conversation
📝 WalkthroughWalkthroughArr, a new Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@library.json`:
- Around line 12-16: Remove the global -DCONFIG_NIMBLE_CPP_IDF=1 from
library.json and instead only define CONFIG_NIMBLE_CPP_IDF for true ESP-IDF
builds (e.g., move the flag into the ESP-IDF-specific build environment or rely
on the IDF's own config), and then fix the fragile preprocessor expressions that
mix && and || by adding explicit parentheses: update the conditional in
src/NimBLEClient.cpp (the preprocessor condition around the client feature at
~line 553) and the conditional in src/NimBLEServer.cpp (the server feature at
~line 1075) to parenthesize the && and || groups so they evaluate correctly when
CONFIG_NIMBLE_CPP_IDF is defined or not; also ensure NimBLEDevice.cpp still uses
the non-IDF header branch when the IDF define is not present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Fixes #407
Summary by CodeRabbit