[BT] Force Active Scan when same interval as as Passive Scan (#1654)

This commit is contained in:
DigiH authored and GitHub committed 2023-05-24 13:20:09 -05:00
1 parent 7df72f6983
commit 88fc5643e8
1 file changed
+1 -1
+1 -1
View File
@@ -764,7 +764,7 @@ void BLEscan() {
BLEScan* pBLEScan = BLEDevice::getScan(); BLEScan* pBLEScan = BLEDevice::getScan();
MyAdvertisedDeviceCallbacks myCallbacks; MyAdvertisedDeviceCallbacks myCallbacks;
pBLEScan->setAdvertisedDeviceCallbacks(&myCallbacks); pBLEScan->setAdvertisedDeviceCallbacks(&myCallbacks);
if (millis() > (timeBetweenActive + BTConfig.intervalActiveScan)) { if (millis() > (timeBetweenActive + BTConfig.intervalActiveScan) || BTConfig.intervalActiveScan == BTConfig.BLEinterval) {
pBLEScan->setActiveScan(true); pBLEScan->setActiveScan(true);
timeBetweenActive = millis(); timeBetweenActive = millis();
} else { } else {