aboutsummaryrefslogtreecommitdiffstats
path: root/examples/direct_bt_scanner01/dbt_scanner01.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-07-26 07:40:06 +0200
committerSven Gothel <[email protected]>2020-07-26 07:40:06 +0200
commitc89c485b430a0e2eaeb6ba4acaeefbcc29e396c8 (patch)
tree641d3ee427ca31b7d3b4e2d54cc88cc3905ff920 /examples/direct_bt_scanner01/dbt_scanner01.cpp
parent2846a8de0e3c0fb8fd861c2a58da40b4bf4db78c (diff)
dbt_scanner0[01]: Fix conversion from getDevice() -> getDeviceChecked()
Diffstat (limited to 'examples/direct_bt_scanner01/dbt_scanner01.cpp')
-rw-r--r--examples/direct_bt_scanner01/dbt_scanner01.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/direct_bt_scanner01/dbt_scanner01.cpp b/examples/direct_bt_scanner01/dbt_scanner01.cpp
index 2fead468..720f68e0 100644
--- a/examples/direct_bt_scanner01/dbt_scanner01.cpp
+++ b/examples/direct_bt_scanner01/dbt_scanner01.cpp
@@ -96,7 +96,7 @@ class MyGATTEventListener : public GATTCharacteristicListener {
void notificationReceived(GATTCharacteristicRef charDecl,
std::shared_ptr<TROOctets> charValue, const uint64_t timestamp) override {
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Notify (td %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
(tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());
@@ -110,7 +110,7 @@ class MyGATTEventListener : public GATTCharacteristicListener {
std::shared_ptr<TROOctets> charValue, const uint64_t timestamp,
const bool confirmationSent) override
{
- const std::shared_ptr<DBTDevice> dev = charDecl->getDevice();
+ const std::shared_ptr<DBTDevice> dev = charDecl->getDeviceChecked();
const int64_t tR = getCurrentMilliseconds();
fprintf(stderr, "****** GATT Indication (confirmed %d, td(msg %" PRIu64 " ms, dev-discovered %" PRIu64 " ms): From %s\n",
confirmationSent, (tR-timestamp), (tR-dev->ts_creation), dev->toString().c_str());