diff options
author | Sven Gothel <[email protected]> | 2020-08-23 09:51:06 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-08-23 09:51:06 +0200 |
commit | 5b60e93bb7b716ece4233dd22fedbe1610664ede (patch) | |
tree | ade697af75f601f6f76cf011ed09b25880a515d7 /examples/direct_bt_scanner10 | |
parent | 1b2a1eaae24734eda2708550aa17bfce6b13cac8 (diff) |
ScannerTinyB10: Expose start/stop discovery result / dbt_scanner10: Align discovery toggle with ScannerTinyB10
Diffstat (limited to 'examples/direct_bt_scanner10')
-rw-r--r-- | examples/direct_bt_scanner10/dbt_scanner10.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp index f1490d23..49e519f9 100644 --- a/examples/direct_bt_scanner10/dbt_scanner10.cpp +++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp @@ -324,6 +324,11 @@ static void processConnectedDevice(std::shared_ptr<DBTDevice> device) { } exit: + removeFromDevicesProcessing(device->getAddress()); + if( !USE_WHITELIST && 0 == devicesInProcessing.size() ) { + device->getAdapter().startDiscovery( true ); + } + if( KEEP_CONNECTED ) { while( device->pingGATT() ) { fprintf(stderr, "****** Processing Device: pingGATT OK: %s\n", device->getAddressString().c_str()); @@ -343,16 +348,12 @@ exit: } device->getAdapter().printSharedPtrListOfDevices(); - removeFromDevicesProcessing(device->getAddress()); if( 0 < MULTI_MEASUREMENTS ) { MULTI_MEASUREMENTS--; fprintf(stderr, "****** Processing Device: MULTI_MEASUREMENTS left %d: %s\n", MULTI_MEASUREMENTS, device->getAddressString().c_str()); } fprintf(stderr, "****** Processing Device: End: Success %d on %s; devInProc %zd\n", success, device->toString().c_str(), devicesInProcessing.size()); - if( !USE_WHITELIST && 0 == devicesInProcessing.size() ) { - device->getAdapter().startDiscovery( true ); - } if( success ) { addToDevicesProcessed(device->getAddress()); } |