aboutsummaryrefslogtreecommitdiff
path: root/apps/ble-inspect-device.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/ble-inspect-device.h')
-rw-r--r--apps/ble-inspect-device.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/ble-inspect-device.h b/apps/ble-inspect-device.h
index bf79b2c..7d93f95 100644
--- a/apps/ble-inspect-device.h
+++ b/apps/ble-inspect-device.h
@@ -28,11 +28,11 @@ public:
void scan_callback(BluetoothDevice &device) {
cout << "Inspecting device: " << device.getMac().str() << endl;
- auto &gatt = device.connectGatt();
+ auto gatt = device.connectGatt();
- gatt.discoverServices();
+ gatt->discoverServices();
- vector < BluetoothGattService * > services = gatt.getServices();
+ vector < BluetoothGattService * > services = gatt->getServices();
cout << "Device has " << services.size() << " services" << endl;
for (auto &s: services) {
@@ -46,8 +46,6 @@ public:
endl;
}
}
-
- gatt.disconnect();
}
int main(app_execution &execution) override {