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 X_NUCLEO_IDB0XA1 X_NUCLEO_IHM02A1 mbed
Fork of Motor_Ble_v10223 by
Revision 3:e0efdb741bd4, committed 2016-02-25
- Comitter:
- apalmieri
- Date:
- Thu Feb 25 10:07:11 2016 +0000
- Parent:
- 2:665462265581
- Child:
- 4:2b2faceadf7e
- Commit message:
- Code cleaning
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Feb 19 15:28:35 2016 +0000
+++ b/main.cpp Thu Feb 25 10:07:11 2016 +0000
@@ -28,7 +28,7 @@
void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)
{
(void)params;
- BLE::Instance().gap().startAdvertising();
+ BLE::Instance().gap().startAdvertising(); // restart advertising
}
/**
@@ -74,8 +74,7 @@
ble.gattServer().onDataWritten(onDataWrittenCallback);
bool initialValueForLEDCharacteristic = true;
- LEDService ledService(ble, initialValueForLEDCharacteristic);
- ledServicePtr = &ledService;
+ ledServicePtr = new LEDService(ble, initialValueForLEDCharacteristic);
/* setup advertising */
ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);
