Skip to content

Commit

Permalink
[BT] Force Active Scan when same interval as as Passive Scan (#1654)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiH authored May 24, 2023
1 parent 7df72f6 commit 88fc564
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/ZgatewayBT.ino
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ void BLEscan() {
BLEScan* pBLEScan = BLEDevice::getScan();
MyAdvertisedDeviceCallbacks myCallbacks;
pBLEScan->setAdvertisedDeviceCallbacks(&myCallbacks);
if (millis() > (timeBetweenActive + BTConfig.intervalActiveScan)) {
if (millis() > (timeBetweenActive + BTConfig.intervalActiveScan) || BTConfig.intervalActiveScan == BTConfig.BLEinterval) {
pBLEScan->setActiveScan(true);
timeBetweenActive = millis();
} else {
Expand Down

0 comments on commit 88fc564

Please sign in to comment.