Skip to content

Commit 06e2ad4

Browse files
committed
Test filtering devices that require connection
1 parent c94fe1c commit 06e2ad4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main/ZgatewayBT.ino

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,10 @@ class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks {
623623
BLEdata.set("id", (char*)mac_adress.c_str());
624624
Log.notice(F("Device detected: %s" CR), (char*)mac_adress.c_str());
625625
BLEdevice* device = getDeviceByMac(BLEdata["id"].as<const char*>());
626+
if (device->connect) {
627+
Log.notice(F("Filtered connectable device" CR));
628+
return;
629+
}
626630

627631
if ((!oneWhite || isWhite(device)) && !isBlack(device)) { //if not black listed mac we go AND if we have no white mac or this mac is white we go out
628632
if (advertisedDevice->haveName())

0 commit comments

Comments
 (0)