Add BLE setScanDuplicateCacheSize (#911)

#906
This commit is contained in:
Florian authored and GitHub committed 2021-04-03 07:44:28 -05:00
1 parent 55dd571c49
commit 6c8ba53276
2 files changed
+4

No files matched your search

+1
View File
@@ -633,6 +633,7 @@ class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
void BLEscan() {
disableCore0WDT();
Log.notice(F("Scan begin" CR));
BLEDevice::setScanDuplicateCacheSize(BLEScanDuplicateCacheSize);
BLEDevice::init("");
BLEScan* pBLEScan = BLEDevice::getScan();
MyAdvertisedDeviceCallbacks myCallbacks;
+3
View File
@@ -62,6 +62,9 @@ bool bleConnect = AttemptBLECOnnect;
#ifndef ScanBeforeConnect
# define ScanBeforeConnect 10 //define number of scans before connecting to BLE devices (ESP32 only, minimum 1)
#endif
#ifndef BLEScanDuplicateCacheSize
# define BLEScanDuplicateCacheSize 200
#endif
#ifndef TimeBtwRead
# define TimeBtwRead 55555 //define default time between 2 scans
#endif