From e1f8d89cabebea4ff517c03cedd0c9859502040a Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Mon, 9 Apr 2018 12:30:49 +0200 Subject: [PATCH] Little code sanitization in BLECount() --- src/macsniff.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/macsniff.cpp b/src/macsniff.cpp index 8822d0fa..624dcba3 100644 --- a/src/macsniff.cpp +++ b/src/macsniff.cpp @@ -142,14 +142,14 @@ void BLECount() { currentScanDevice = 0; // Set 0 seen device on this scan session u8x8.drawString(0,3,"Scanning->"); BLEDevice::init(""); // we don't want to be seen by a name + BLEScanResults foundDevices; // instance for getting count BLEScan* pBLEScan = BLEDevice::getScan(); //create new scan pBLEScan->setAdvertisedDeviceCallbacks(new MyAdvertisedDeviceCallbacks()); - pBLEScan->setActiveScan(false); // An active scan would mean that we will wish a scan response. + pBLEScan->setActiveScan(false); // An active scan would mean that we will wish unneeeded scan responses pBLEScan->setWindow(BLESCANWINDOW); pBLEScan->setInterval(BLESCANINTERVAL); - BLEScanResults foundDevices = pBLEScan->start(cfg.blescantime); // note: this is a blocking call - int blenum=foundDevices.getCount(); - ESP_LOGI(TAG, "BLE scan done, seen %d device(s)", blenum); + pBLEScan->start(cfg.blescantime); // note: this is a blocking call + ESP_LOGI(TAG, "BLE scan done, seen %d device(s)", foundDevices.getCount()); } #endif