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.
Diff: source/TOFService.h
- Revision:
- 80:5e52c5847273
- Parent:
- 79:9f3aca04de4e
--- a/source/TOFService.h Thu Jan 31 12:55:00 2019 +0000
+++ b/source/TOFService.h Fri Feb 01 14:08:20 2019 +0000
@@ -5,17 +5,15 @@
class TOFService {
public:
- const static uint8_t TOF_CHAR_ARRAY_SIZE = 100;
+ const static uint16_t TOF_CHAR_ARRAY_SIZE = 100;
const static uint16_t CUSTOM_TOF_SERVICE_UUID = 0xA000;
const static uint16_t TOF_CHAR_WRITE_CHARACTERISTIC_UUID = 0xA001;
TOFService(BLE& _ble) :
ble(_ble),
- //writeCharArrayCharacteristic(TOF_CHAR_WRITE_CHARACTERISTIC_UUID, writeValue)
- writeCharArrayCharacteristic(TOF_CHAR_WRITE_CHARACTERISTIC_UUID, writeBuffer, 1, 100,
- GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_EXTENDED_PROPERTIES)
+ writeCharArrayCharacteristic(TOF_CHAR_WRITE_CHARACTERISTIC_UUID, writeBuffer)
{
- static bool serviceAdded = false; /* We should only ever need to add the information service once. */
+ static bool serviceAdded = false;
if (serviceAdded) {
return;
}
@@ -37,8 +35,7 @@
uint8_t writeBuffer[TOF_CHAR_ARRAY_SIZE];
- //WriteOnlyArrayGattCharacteristic<uint8_t, sizeof(writeBuffer)> writeCharArrayCharacteristic;
- GattCharacteristic writeCharArrayCharacteristic;
+ WriteOnlyArrayGattCharacteristic<uint8_t, sizeof(writeBuffer)> writeCharArrayCharacteristic;
};
#endif /* #ifndef __BLE_TOF_SERVICE_H__*/
\ No newline at end of file