mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-05 14:56:32 +02:00
improve & fix BLEScan when wantDuplicates (#3995)
* improve & fix BLEScan when too many BLE devices - when wantDuplicates, no need to check duplicate and no more insert into vector - delete advertisedDevice when not insert into vector, fix memory leak - add showParse when you just want raw advertised data
This commit is contained in:
@ -388,6 +388,15 @@ void BLEAdvertisedDevice::parseAdvertisement(uint8_t* payload, size_t total_len)
|
||||
} // !finished
|
||||
} // parseAdvertisement
|
||||
|
||||
/**
|
||||
* @brief Parse the advertising payload.
|
||||
* @param [in] payload The payload of the advertised device.
|
||||
* @param [in] total_len The length of payload
|
||||
*/
|
||||
void BLEAdvertisedDevice::setPayload(uint8_t* payload, size_t total_len) {
|
||||
m_payload = payload;
|
||||
m_payloadLength = total_len;
|
||||
} // setPayload
|
||||
|
||||
/**
|
||||
* @brief Set the address of the advertised device.
|
||||
|
Reference in New Issue
Block a user