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.
Dependents: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: services/HeartRateService.h
- Revision:
- 520:2ac0f11a183a
- Parent:
- 514:1fa338281798
- Child:
- 521:b2dae8d95c4d
--- a/services/HeartRateService.h Fri Jun 19 15:52:05 2015 +0100
+++ b/services/HeartRateService.h Fri Jun 19 15:52:06 2015 +0100
@@ -127,17 +127,10 @@
private:
void setupService(void) {
- static bool serviceAdded = false; /* We should only ever need to add the heart rate service once. */
- if (serviceAdded) {
- return;
- }
-
GattCharacteristic *charTable[] = {&hrmRate, &hrmLocation, &controlPoint};
GattService hrmService(GattService::UUID_HEART_RATE_SERVICE, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));
ble.addService(hrmService);
- serviceAdded = true;
-
ble.onDataWritten(this, &HeartRateService::onDataWritten);
}
