-
-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Since version 2.3.1 I am receiving both errors described in the title multiple times.
In my project I have "CONFIG_BT_NIMBLE_ROLE_PERIPHERAL=y" and "CONFIG_BT_NIMBLE_ROLE_BROADCASTER=n"
The nimconfig.h does this:
/ Cannot use server without advertise /
#if defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL) && !defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER)
#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER
#endif
And in several parts of the code (like NimBLEAdvertisementData.cpp) you have things like this:
#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(DOXYGEN)
...
#endif
...and the error appears in the second && complaining about CONFIG_BT_NIMBLE_ROLE_BROADCASTER with "operator '&&' has no right operand"
There are 2 possible solutions here:
- or either you do "#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER 1" instead of "#define CONFIG_BT_NIMBLE_ROLE_BROADCASTER" in the nimconfig.h
- or either you replace all appearances of "#if (CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV) || defined(DOXYGEN)" by using "defined(CONFIG_BT_NIMBLE_ROLE_BROADCASTER )" instead of plain "CONFIG_BT_NIMBLE_ROLE_BROADCASTER"