Skip to content

Commit

Permalink
Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h (
Browse files Browse the repository at this point in the history
…#806)

In some cases compilation of examples would fail due to missing these headers so they should be included in NimBLEDevice.h
  • Loading branch information
h2zero authored Dec 15, 2024
1 parent 7300547 commit c7ce289
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.
- Compile error when central is disabled, class `NimBLEServer` has no member named `m_pClient`.
- Compile error with nRF devices, unresolved symbol `nimble_port_stop`.

## Changed
- Added missing includes for `NimBLEConnInfo` and `NimBLEUtils` to `NimBLEDevice.h`.

## [2.1.0] 2024-12-14

## **Breaking changes**
Expand Down
11 changes: 3 additions & 8 deletions src/NimBLEDescriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@
#include "nimconfig.h"
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)

class NimBLEDescriptor;
class NimBLEDescriptorCallbacks;

# include "NimBLELocalValueAttribute.h"
# include "NimBLECharacteristic.h"
# include "NimBLEUUID.h"
# include "NimBLEAttValue.h"
# include "NimBLEConnInfo.h"

# include <string>

class NimBLECharacteristic;
class NimBLEDescriptorCallbacks;

/**
* @brief A model of a BLE descriptor.
*/
Expand Down
6 changes: 6 additions & 0 deletions src/NimBLEDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,11 @@ class NimBLEDevice {
# endif
# endif

# if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) || defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
# include "NimBLEConnInfo.h"
# endif

# include "NimBLEUtils.h"

#endif // CONFIG_BT_ENABLED
#endif // NIMBLE_CPP_DEVICE_H_

0 comments on commit c7ce289

Please sign in to comment.