High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Diff: services/BatteryService.h
- Revision:
- 520:2ac0f11a183a
- Parent:
- 277:1407d2f1ce3c
- Child:
- 521:b2dae8d95c4d
--- a/services/BatteryService.h Fri Jun 19 15:52:05 2015 +0100 +++ b/services/BatteryService.h Fri Jun 19 15:52:06 2015 +0100 @@ -38,16 +38,10 @@ batteryLevel(level), batteryLevelCharacteristic(GattCharacteristic::UUID_BATTERY_LEVEL_CHAR, &batteryLevel, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) { - static bool serviceAdded = false; /* We should only ever need to add the heart rate service once. */ - if (serviceAdded) { - return; - } - GattCharacteristic *charTable[] = {&batteryLevelCharacteristic}; GattService batteryService(GattService::UUID_BATTERY_SERVICE, charTable, sizeof(charTable) / sizeof(GattCharacteristic *)); ble.addService(batteryService); - serviceAdded = true; } /**