summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-14 19:20:31 +0200
committerSven Gothel <[email protected]>2020-10-14 19:20:31 +0200
commit68ba75dc27817ac50cd1c9ae078bf36e09dedd76 (patch)
treebbcdbd37f1c700757d0955ac5e91e2c0b32caeb7 /examples
parentc5849f1a131ad107ac7c4afd3cede0c560cf2bf4 (diff)
dbt_scanner10: Utilize 'default adapter' if no explicit dev_id is given, i.e. use 1st POWERED adapter
Diffstat (limited to 'examples')
-rw-r--r--examples/direct_bt_scanner10/dbt_scanner10.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp
index a30096bc..3ea3e0dc 100644
--- a/examples/direct_bt_scanner10/dbt_scanner10.cpp
+++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp
@@ -509,7 +509,7 @@ void test(int dev_id) {
timestamp_t0 = getCurrentMilliseconds();
- DBTAdapter adapter(dev_id);
+ DBTAdapter adapter(dev_id); // given dev_id >= 0 or default adapter (1st powered)
if( !adapter.hasDevId() ) {
fprintf(stderr, "Default adapter not available.\n");
exit(1);
@@ -561,7 +561,7 @@ void test(int dev_id) {
int main(int argc, char *argv[])
{
- int dev_id = 0; // default
+ int dev_id = -1; // default
BTMode btMode = BTMode::NONE;
bool waitForEnter=false;