[BLE] Callback leads to memory decrease correction (#740)

and library update
This commit is contained in:
Florian authored and GitHub committed 2020-08-22 20:45:39 -05:00
1 parent d6d42bfce5
commit 9d22f242e8
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -480,7 +480,8 @@ void BLEscan() {
Log.notice(F("Scan begin" CR));
BLEDevice::init("");
BLEScan* pBLEScan = BLEDevice::getScan(); //create new scan
pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks());
MyAdvertisedDeviceCallbacks myCallbacks;
pBLEScan->setAdvertisedDeviceCallbacks(&myCallbacks);
pBLEScan->setActiveScan(true); //active scan uses more power, but get results faster
BLEScanResults foundDevices = pBLEScan->start(Scan_duration / 1000, false);
scanCount++;