Skip to content

Commit ec4d4c4

Browse files
committed
Add missing NimBLEUtils and NimBLEConnInfo includes to NimBLEDevice.h
In some cases compilation of examples would fail due to missing these headers so they should be included in NimBLEDevice.h
1 parent 3e0ce87 commit ec4d4c4

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ All notable changes to this project will be documented in this file.
55

66
## Fixed
77
- `NimBLEHIDDevice::getOutputReport` will now return the correct characteristic.
8-
- Compile error when central is disabled.
8+
- Compile error when central is disabled, class `NimBLEServer` has no member named `m_pClient`.
9+
10+
## Changed
11+
- Added missing includes for `NimBLEConnInfo` and `NimBLEUtils` to `NimBLEDevice.h`.
912

1013
## [2.0.0] 2024-12-14
1114

src/NimBLEDescriptor.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@
2121
#include "nimconfig.h"
2222
#if defined(CONFIG_BT_ENABLED) && defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
2323

24-
class NimBLEDescriptor;
25-
class NimBLEDescriptorCallbacks;
26-
2724
# include "NimBLELocalValueAttribute.h"
28-
# include "NimBLECharacteristic.h"
29-
# include "NimBLEUUID.h"
30-
# include "NimBLEAttValue.h"
31-
# include "NimBLEConnInfo.h"
32-
3325
# include <string>
3426

27+
class NimBLECharacteristic;
28+
class NimBLEDescriptorCallbacks;
29+
3530
/**
3631
* @brief A model of a BLE descriptor.
3732
*/

src/NimBLEDevice.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,5 +282,11 @@ class NimBLEDevice {
282282
# endif
283283
# endif
284284

285+
# if defined(CONFIG_BT_NIMBLE_ROLE_CENTRAL) || defined(CONFIG_BT_NIMBLE_ROLE_PERIPHERAL)
286+
# include "NimBLEConnInfo.h"
287+
# endif
288+
289+
# include "NimBLEUtils.h"
290+
285291
#endif // CONFIG_BT_ENABLED
286292
#endif // NIMBLE_CPP_DEVICE_H_

0 commit comments

Comments
 (0)