mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-21 20:50:55 +01:00
Add clearData method to NimBLEAdvertisementData.
This commit is contained in:
parent
20349c64a4
commit
bc7bfe8278
2 changed files with 9 additions and 0 deletions
|
@ -1064,4 +1064,12 @@ std::string NimBLEAdvertisementData::getPayload() {
|
|||
return m_payload;
|
||||
} // getPayload
|
||||
|
||||
|
||||
/**
|
||||
* @brief Clear the advertisement data for reuse.
|
||||
*/
|
||||
void NimBLEAdvertisementData::clearData() {
|
||||
m_payload.clear();
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BT_ENABLED && CONFIG_BT_NIMBLE_ROLE_BROADCASTER && !CONFIG_BT_NIMBLE_EXT_ADV */
|
||||
|
|
|
@ -76,6 +76,7 @@ public:
|
|||
void addTxPower();
|
||||
void setPreferredParams(uint16_t min, uint16_t max);
|
||||
std::string getPayload(); // Retrieve the current advert payload.
|
||||
void clearData(); // Clear the advertisement data.
|
||||
|
||||
private:
|
||||
friend class NimBLEAdvertising;
|
||||
|
|
Loading…
Reference in a new issue