h2zero / NimBLE-Arduino

A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.
https://h2zero.github.io/NimBLE-Arduino/
Apache License 2.0
667 stars 138 forks source link

API change - feature test macro missing #673

Closed mhaberler closed 1 month ago

mhaberler commented 1 month ago

Hi,

switching espressif32 versions and matching NimBLE-Arduino or esp-nimble-cpp versions leads to contraptions like this:

#ifdef NIMBLE_OLDAPI
    pBLEScan->setAdvertisedDeviceCallbacks(new scanCallbacks());
#else
    pBLEScan->setScanCallbacks(new scanCallbacks());
#endif

did I overlook a feature test macro for the API change? if not - could I suggest to add one?

thanks Michael

h2zero commented 1 month ago

@mhaberler, if you use the NimBLE-Arduino Master branch instead of release/1.4 then the functions are the same and this conditional will not be necessary.

mhaberler commented 1 month ago

appreciated - thanks!