diff options
author | Sven Gothel <[email protected]> | 2020-05-31 05:25:57 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-05-31 05:25:57 +0200 |
commit | 18bfd4108c06669256c7d52d961fe6197eceb202 (patch) | |
tree | 4ef25b4cacc6bfbee4466d615571d442418f91dc /examples/java | |
parent | ccd04991b0c18079dab88b3335a8b20e22ab9629 (diff) |
C++/Java Scanner 10: Refine found/connect criteria: Also in EUI48_ANY_DEVICE case, skip devices-in-processing
Diffstat (limited to 'examples/java')
-rw-r--r-- | examples/java/ScannerTinyB10.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/examples/java/ScannerTinyB10.java b/examples/java/ScannerTinyB10.java index 1a97ea84..2f81f54d 100644 --- a/examples/java/ScannerTinyB10.java +++ b/examples/java/ScannerTinyB10.java @@ -91,10 +91,9 @@ public class ScannerTinyB10 { System.err.println("****** FOUND__-2: Skip non public LE "+device.toString()); return; } - if( waitForDevice.equals(EUI48_ANY_DEVICE) || - ( waitForDevice.equals(device.getAddress()) && - !devicesProcessed.contains(waitForDevice) && - !devicesInProcessing.contains(waitForDevice) + if( !devicesInProcessing.contains( device.getAddress() ) && + ( waitForDevice.equals(EUI48_ANY_DEVICE) || + ( waitForDevice.equals(device.getAddress()) && !devicesProcessed.contains(waitForDevice) ) ) ) { System.err.println("****** FOUND__-0: Connecting "+device.toString()); @@ -125,10 +124,9 @@ public class ScannerTinyB10 { return; } - if( waitForDevice.equals(EUI48_ANY_DEVICE) || - ( waitForDevice.equals(device.getAddress()) && - !devicesProcessed.contains(waitForDevice) && - !devicesInProcessing.contains(waitForDevice) + if( !devicesInProcessing.contains( device.getAddress() ) && + ( waitForDevice.equals(EUI48_ANY_DEVICE) || + ( waitForDevice.equals(device.getAddress()) && !devicesProcessed.contains(waitForDevice) ) ) ) { System.err.println("****** CONNECTED-0: Processing "+device.toString()); |