No changes
Fork of nRF51822 by
Diff: source/nRF5xServiceDiscovery.cpp
- Revision:
- 532:c8df45b865f7
- Parent:
- 529:7b8ca6778535
- Child:
- 533:f72aaae1e61e
diff -r ce44c7adfa8f -r c8df45b865f7 source/nRF5xServiceDiscovery.cpp --- 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();