High level Bluetooth Low Energy API and radio abstraction layer

Dependencies:   nRF51822

Dependents:   LinkNode_LIS3DH

Fork of BLE_API by Bluetooth Low Energy

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);
     }