For with fix for disconnection notifications

Fork of nRF51822 by Nordic Semiconductor

Files at this revision

API Documentation at this revision

Comitter:
Rohit Grover
Date:
Thu May 29 08:57:16 2014 +0100
Parent:
12:e151f55035b8
Child:
14:5ca08f962e4f
Commit message:
using accessor methods for members of UUID

Changed in this revision

btle/custom/custom_helper.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/btle/custom/custom_helper.cpp	Thu May 29 08:26:42 2014 +0100
+++ b/btle/custom/custom_helper.cpp	Thu May 29 08:57:16 2014 +0100
@@ -86,16 +86,16 @@
 ble_uuid_t custom_convert_to_nordic_uuid(const UUID &uuid)
 {
     ble_uuid_t nordicUUID = {
-        .uuid = uuid.value,
+        .uuid = uuid.get16BitUUID(),
         .type = BLE_UUID_TYPE_UNKNOWN /* to be set below */
     };
 
-    if (uuid.type == UUID::UUID_TYPE_SHORT) {
+    if (uuid.shortOrLong() == UUID::UUID_TYPE_SHORT) {
         nordicUUID.type = BLE_UUID_TYPE_BLE;
     } else {
-        if (!lookupConvertedUUIDTable(uuid.base, &nordicUUID.type)) {
-            nordicUUID.type = custom_add_uuid_base(uuid.base);
-            addToConvertedUUIDTable(uuid.base, nordicUUID.type);
+        if (!lookupConvertedUUIDTable(uuid.getBaseUUID(), &nordicUUID.type)) {
+            nordicUUID.type = custom_add_uuid_base(uuid.getBaseUUID());
+            addToConvertedUUIDTable(uuid.getBaseUUID(), nordicUUID.type);
         }
     }