summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-09-18 03:00:53 +0200
committerSven Gothel <[email protected]>2020-09-18 03:00:53 +0200
commit13e9671e6cea5aa1a96758d35ab80646d80c19c4 (patch)
treed53c62c065271d45cab83826218e7b9df6773788 /examples
parenta3fe455ed4e4c2167b983196cdb4feb8c8230f62 (diff)
dbt_scanner10: Also silence printSharedPtrListOfDevices if SILENT_GATT
Diffstat (limited to 'examples')
-rw-r--r--examples/direct_bt_scanner10/dbt_scanner10.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/direct_bt_scanner10/dbt_scanner10.cpp b/examples/direct_bt_scanner10/dbt_scanner10.cpp
index 63901e68..84d2ff13 100644
--- a/examples/direct_bt_scanner10/dbt_scanner10.cpp
+++ b/examples/direct_bt_scanner10/dbt_scanner10.cpp
@@ -279,7 +279,9 @@ static void processConnectedDevice(std::shared_ptr<DBTDevice> device) {
// GATT Service Processing
//
fprintf(stderr, "****** Processing Device: GATT start: %s\n", device->getAddressString().c_str());
- device->getAdapter().printSharedPtrListOfDevices();
+ if( !SILENT_GATT ) {
+ device->getAdapter().printSharedPtrListOfDevices();
+ }
try {
std::vector<GATTServiceRef> primServices = device->getGATTServices(); // implicit GATT connect...
if( 0 == primServices.size() ) {
@@ -375,7 +377,9 @@ exit:
fprintf(stderr, "****** Processing Device: removing: %s\n", device->getAddressString().c_str());
device->remove();
}
- device->getAdapter().printSharedPtrListOfDevices();
+ if( !SILENT_GATT ) {
+ device->getAdapter().printSharedPtrListOfDevices();
+ }
if( 0 < MULTI_MEASUREMENTS ) {
MULTI_MEASUREMENTS--;