Add onDiscovered scan callback.

This adds a callback that is called when a device is initially discovered.
It is always called wether scanning in passive or active mode. This allows
for active scanning to receive device detection information in the case where
the scan response is not sent/received.

This callback is optional, the application may decide to implement it or not.
This commit is contained in:
h2zero
2023-04-06 15:56:53 -06:00
committed by h2zero
parent 559a26b74b
commit 46e7bb9302
5 changed files with 73 additions and 20 deletions

View File

@@ -33,7 +33,7 @@ NimBLEAdvertisedDevice::NimBLEAdvertisedDevice() :
{
m_advType = 0;
m_rssi = -9999;
m_callbackSent = false;
m_callbackSent = 0;
m_timestamp = 0;
m_advLength = 0;
} // NimBLEAdvertisedDevice