From b6b206a191029755bd155eaa0a1797c2f44a0cfc Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 17 Nov 2021 03:49:44 +0100 Subject: BTAdapter::startDiscovery(..): Add 'bool filter_dup=true' as last parameter; Java: Same, but no default value possible (minor API change) --- examples/java/DBTScanner10.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/java/DBTScanner10.java b/examples/java/DBTScanner10.java index ebd609f1..d61b61c9 100644 --- a/examples/java/DBTScanner10.java +++ b/examples/java/DBTScanner10.java @@ -627,17 +627,19 @@ public class DBTScanner10 { BTUtils.println(System.err, "****** Reset Adapter: reset["+mode+"] end: "+res+", "+adapter.toString()); } + static boolean keep_alive = true; // default value static boolean le_scan_active = true; // default value static final short le_scan_interval = (short)24; // default value static final short le_scan_window = (short)24; // default value static final byte filter_policy = (byte)0; // default value + static final boolean filter_dup = true; // default value private boolean startDiscovery(final BTAdapter adapter, final String msg) { if( !useAdapter.equals(EUI48.ALL_DEVICE) && !useAdapter.equals(adapter.getAddressAndType().address) ) { BTUtils.fprintf_td(System.err, "****** Start discovery (%s): Adapter not selected: %s\n", msg, adapter.toString()); return false; } - final HCIStatusCode status = adapter.startDiscovery( true, le_scan_active, le_scan_interval, le_scan_window, filter_policy ); + final HCIStatusCode status = adapter.startDiscovery( keep_alive, le_scan_active, le_scan_interval, le_scan_window, filter_policy, filter_dup ); BTUtils.println(System.err, "****** Start discovery ("+msg+") result: "+status); return HCIStatusCode.SUCCESS == status; } -- cgit v1.2.3