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:
- 663:73177d7c6e75
- Parent:
- 659:5fc41956cbd0
- Child:
- 664:1624b24837d0
diff -r 25a8bce7f2e5 -r 73177d7c6e75 services/HeartRateService.h
--- a/services/HeartRateService.h Fri Jun 19 15:53:00 2015 +0100
+++ b/services/HeartRateService.h Fri Jun 19 15:53:00 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);
}
