diff --git a/src/bluetooth.cpp b/src/bluetooth.cpp index 27981cd..13b61f9 100644 --- a/src/bluetooth.cpp +++ b/src/bluetooth.cpp @@ -70,8 +70,13 @@ void BlueTooth::loop() { if (millis() - lastRun > (BT_DEFAULT_SCAN_DURATION_IN_SECONDS * 1000) + 2000) { // Otherwise makes no sens to scan and sent it over if (networkConnected) { - BLEScanResults foundDevices = pBLEScan->start(BT_DEFAULT_SCAN_DURATION_IN_SECONDS, false); + // Clear result is before the scan, because there is an assumption that the clear result makes an issue right after the scan + // Details: - https://github.com/redakker/blecker/issues/58 + // - https://github.com/espressif/arduino-esp32/issues/5860 + // pBLEScan->clearResults(); // delete results fromBLEScan buffer to release memory + + BLEScanResults foundDevices = pBLEScan->start(BT_DEFAULT_SCAN_DURATION_IN_SECONDS, false); lastRun = millis(); } } diff --git a/src/webcontent.h b/src/webcontent.h index 3efffcb..88d2694 100644 --- a/src/webcontent.h +++ b/src/webcontent.h @@ -391,7 +391,7 @@ BLEcker home update -