[BLE] Callback leads to memory decrease correction (#740)
and library update
This commit is contained in:
1 parent
d6d42bfce5
commit
9d22f242e8
2 files changed
+3
-2
No files matched your search
+2
-1
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user