RE: Change check for BT_ENABLE to really be a check for BLUEDROID_ENABLED #4497
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
My project has migrated away from the bluedroid based Bluetooth API in this project, but I'd still like to be able to use the rest of the arduino api. It turns out, the change needed to make that happen is quite minor (though it does need to be applied many places). The existing code was checking for the CONFIG_BT_ENABLED flag, when really it would be better to check for CONFIG_BLUEDROID_ENABLED. Because the BLE classes in here are Bluedroid specific.
With this change, projects that have turned off BLUEDROID_ENABLED (but left on BT_ENABLED) will build correctly. Since existing projects (including the prebuilt esp32-arduino-lib-builder) binaries define BLUEDROID_ENABLED any time BT_ENABLED is set - it shouldn't break existing usage.
Btw - I'm now using Nimble as my BLE stack and it works great (and is super small). It is also a nicer (and open source) API than bluedroid, so it doesn't need the same amount of helpful wrapper classes.