Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Fork of BLE_MIDI by
Revision 4:53fa90f45a8e, committed 2016-07-25
- Comitter:
- comoc
- Date:
- Mon Jul 25 06:02:49 2016 +0000
- Parent:
- 3:2b71bfbaa458
- Commit message:
- fix a bug in counting the length of the device name string.
Changed in this revision
| BLEMIDI.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2b71bfbaa458 -r 53fa90f45a8e BLEMIDI.cpp
--- a/BLEMIDI.cpp Tue Apr 07 09:24:31 2015 +0000
+++ b/BLEMIDI.cpp Mon Jul 25 06:02:49 2016 +0000
@@ -310,7 +310,7 @@
/* setup advertising */
device->accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_128BIT_SERVICE_IDS, (uint8_t*)uuid128_list, sizeof(uuid128_list));
device->accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
- device->accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)deviceName, sizeof(deviceName));
+ device->accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)deviceName, strlen(deviceName));
device->setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);
device->setAdvertisingInterval(160); /* 100ms; in multiples of 0.625ms. */
