-
-
Notifications
You must be signed in to change notification settings - Fork 174
Type redefinition errors on latest Arduino IDE master #16
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
Comments
Thanks for reporting this I'll have a look at it soon. Those typedefs only exist for compatibility and I'm not even sure they are necessary, with any luck they can be removed completely as I'd prefer not to use esp specific code at all if possible. |
Had a quick look into this and I don't see any issue unless `#include "esp_bt_defs.h" is included in your sketch. So unless there is some need for that include, you can remove it, I will put a guard on the defines later. |
I think the issue is that this file seemingly gets included by default when including the WiFi/HTTPClient clients:
|
The errors appear if I #include <Arduino.h> or #include <WiFi.h>. I do not #include "esp_bt_defs.h |
Thanks, good to know, I'll try to get this fixed today. |
A fix is available on the branch GitHub linked above (renaming the defines as @Jeroen88 suggested) if you want to pull it and be done with it, though I can't comment as to whether it's the right fix... :) |
@thorrak Thanks, the reason these are there is for backward compatibility if someone used them in their sketch from the old Library so I needed to keep the names the same. I'm thinking of just eliminating them instead and just directing users to use the NimBLE types. |
Fixed in commit ff99200. |
Fixed by PR |
First: compliments for the excellent work to reduce the memory footprint for BLE!
Today I updated my ESP32 Arduino IDE to the latest master, and I got compilation errors (type redefinition errors). The cause was in NimbleAddress.h:
I changed it to:
Now I also had to change NimBLEClient.h into:
bool connect(NimBLEAddress address, esp_nimble_addr_type_t type = NIMBLE_ADDR_TYPE_PUBLIC, bool refreshServices = true); // Connect to the remote BLE Server
and NimBLEClient.cpp:
bool NimBLEClient::connect(NimBLEAddress address, esp_nimble_addr_type_t type, bool refreshServices) {
and lastly in this file:
return connect(address, (esp_nimble_addr_type_t)type, refreshServices);
The text was updated successfully, but these errors were encountered: