High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 307:ecbc3405c66e, committed 2015-03-02
- Comitter:
- rgrover1
- Date:
- Mon Mar 02 11:50:49 2015 +0000
- Parent:
- 306:ae0df1c9222a
- Child:
- 308:bc040f8592b7
- Commit message:
- Synchronized with git rev 22243be7
Author: Rohit Grover
Release 0.2.14
==============
Enhancements
~~~~~~~~~~~~
* Remove the entire thing about zeroing out bytes 2 and 3 of long UUID. Fixes #35.
Bugfixes
~~~~~~~~
none.
Compatibility
~~~~~~~~~~~~~
This release is API compatible with 0.2.4.
Changed in this revision
common/UUID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/common/UUID.cpp Mon Mar 02 11:50:49 2015 +0000 +++ b/common/UUID.cpp Mon Mar 02 11:50:49 2015 +0000 @@ -66,24 +66,10 @@ @endcode */ /**************************************************************************/ -UUID::UUID(const LongUUIDBytes_t longUUID) : type(UUID_TYPE_SHORT), baseUUID(), shortUUID(0) +UUID::UUID(const LongUUIDBytes_t longUUID) : type(UUID_TYPE_LONG), baseUUID(), shortUUID(0) { memcpy(baseUUID, longUUID, LENGTH_OF_LONG_UUID); shortUUID = (uint16_t)((longUUID[2] << 8) | (longUUID[3])); - - /* Check if this is a short of a long UUID */ - unsigned index; - for (index = 0; index < LENGTH_OF_LONG_UUID; index++) { - if ((index == 2) || (index == 3)) { - continue; /* we should not consider bytes 2 and 3 because that's - * where the 16-bit relative UUID is placed. */ - } - - if (baseUUID[index] != 0) { - type = UUID_TYPE_LONG; - return; - } - } } bool UUID::operator==(const UUID &other) const