File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
18
18
- ` NimBLEAdvertising::setManufacturerData ` new overload method that accepts a vector of ` uint8_t ` .
19
19
- ` NimBLEAdvertisementData::setManufacturerData ` new overload method that accepts a vector of ` uint8_t ` .
20
20
- ` NimBLEAdvertisedDevice ` new method: ` getPayloadByType ` , to get data from generic data types advertised.
21
+ - ` NimBLEAdvertisementData::clearData ` clears the data for updating/reuse.
21
22
22
23
### Changed
23
24
- ` NimBLEAdvertisedDevice::getManufacturerData ` , now takes an index value parameter to use when there is more than 1 instance of manufacturer data.
Original file line number Diff line number Diff line change @@ -1067,4 +1067,12 @@ std::string NimBLEAdvertisementData::getPayload() {
1067
1067
return m_payload;
1068
1068
} // getPayload
1069
1069
1070
+
1071
+ /* *
1072
+ * @brief Clear the advertisement data for reuse.
1073
+ */
1074
+ void NimBLEAdvertisementData::clearData () {
1075
+ m_payload.clear ();
1076
+ }
1077
+
1070
1078
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV */
Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ class NimBLEAdvertisementData {
72
72
void addTxPower ();
73
73
void setPreferredParams (uint16_t min, uint16_t max);
74
74
std::string getPayload (); // Retrieve the current advert payload.
75
+ void clearData (); // Clear the advertisement data.
75
76
76
77
private:
77
78
friend class NimBLEAdvertising ;
You can’t perform that action at this time.
0 commit comments