-
-
Notifications
You must be signed in to change notification settings - Fork 204
Closed
Description
CONFIG_BT_NIMBLE_MAX_CONNECTIONS is defined solely in the nimconfig.h header of the library. This requires a change to the library file to increase the number of connections. To make it more portable, I would like to define this macro in the bluild_flags of my PlatformIO project, like so:
build_flags =
-D CONFIG_NIMBLE_CPP_ENABLE_RETURN_CODE_TEXT
-D CONFIG_BT_NIMBLE_MAX_CONNECTIONS=9This currently generates a compiler warning, because it's already defined:
.pio/libdeps/lolind32pro-lolintft24/NimBLE-Arduino/src/nimconfig.h:105:0: warning: "CONFIG_BT_NIMBLE_MAX_CONNECTIONS"
redefined #define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
It would be nice if the #define in the nimconfig.h header would be enclosed by #ifndef checks:
#ifndef CONFIG_BT_NIMBLE_MAX_CONNECTIONS
#define CONFIG_BT_NIMBLE_MAX_CONNECTIONS 3
#endifThis way, the macro can be set in the project without the need to touch any of the library files. This is especially handy when using the platformio library version of NimBLE-Arduino. The change will be transparent for users that don't use build flags.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels