config changes
Fork of nRF51822 by
Revision 532:c8df45b865f7, committed 2015-12-02
- Comitter:
- rgrover1
- Date:
- Wed Dec 02 13:14:18 2015 +0000
- Parent:
- 531:ce44c7adfa8f
- Child:
- 533:f72aaae1e61e
- Commit message:
- Synchronized with git rev 178931fe
Author: Rohit Grover
Merge branch 'uuid' of https://github.com/marcuschangarm/ble-nrf51822 into marcuschangarm-uuid
Changed in this revision
source/nRF5xServiceDiscovery.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/source/nRF5xServiceDiscovery.cpp Wed Dec 02 13:14:18 2015 +0000 +++ b/source/nRF5xServiceDiscovery.cpp Wed Dec 02 13:14:18 2015 +0000 @@ -251,9 +251,9 @@ if (state == DISCOVER_SERVICE_UUIDS) { if ((response->count == 1) && (response->value_len == UUID::LENGTH_OF_LONG_UUID)) { UUID::LongUUIDBytes_t uuid; - /* Switch longUUID bytes to MSB */ + for (unsigned i = 0; i < UUID::LENGTH_OF_LONG_UUID; i++) { - uuid[i] = response->handle_value[0].p_value[UUID::LENGTH_OF_LONG_UUID - 1 - i]; + uuid[i] = response->handle_value[0].p_value[i]; } unsigned serviceIndex = serviceUUIDDiscoveryQueue.dequeue(); @@ -266,9 +266,9 @@ } else if (state == DISCOVER_CHARACTERISTIC_UUIDS) { if ((response->count == 1) && (response->value_len == UUID::LENGTH_OF_LONG_UUID + 1 /* props */ + 2 /* value handle */)) { UUID::LongUUIDBytes_t uuid; - /* Switch longUUID bytes to MSB */ + for (unsigned i = 0; i < UUID::LENGTH_OF_LONG_UUID; i++) { - uuid[i] = response->handle_value[0].p_value[3 + UUID::LENGTH_OF_LONG_UUID - 1 - i]; + uuid[i] = response->handle_value[0].p_value[3 + i]; } unsigned charIndex = charUUIDDiscoveryQueue.dequeue();