Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: ble/services/BatteryService.h
- Revision:
- 727:1a1f5c5aedfe
- Parent:
- 722:eab9499e4250
- Child:
- 728:997ba5e7b3b6
--- a/ble/services/BatteryService.h Thu Jul 02 09:06:12 2015 +0100 +++ b/ble/services/BatteryService.h Mon Jul 06 10:10:34 2015 +0100 @@ -53,7 +53,7 @@ */ void updateBatteryLevel(uint8_t newLevel) { batteryLevel = newLevel; - ble.gattServer().write(batteryLevelCharacteristic.getValueHandle(), &batteryLevel, 1); + ble.updateCharacteristicValue(batteryLevelCharacteristic.getValueAttribute().getHandle(), &batteryLevel, 1); } protected: