From 8446dd62f941c305c8baf0334145a1c75cc8f868 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Dec 2016 18:45:40 +0100 Subject: [PATCH 1/2] Update API.md Attempt at clarifying the BLECharacteristic initialisation when using non-string values containing 0's. --- API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/API.md b/API.md index 52d757e..b1b2dea 100644 --- a/API.md +++ b/API.md @@ -233,6 +233,12 @@ Choice of: or * value - string value (max: 20 characters on nRF8001 and nRF51822) + + Please take note that in order to initiate a characteristic containing one or more 0's (i.e. not a real string) you should use a combination of + ``` + BLECharacteristic(const char* uuid, unsigned char properties, sizeof(value)); + BLECharacteristic.setValue((unsigned char*)value, sizeof(value)); + ``` ## Get value ```c From 7ec9de7130a726f0a21ee1112f680a2b063c0a54 Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 6 Dec 2016 20:49:54 +0100 Subject: [PATCH 2/2] Update API.md Correct typo --- API.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API.md b/API.md index b1b2dea..abe93db 100644 --- a/API.md +++ b/API.md @@ -234,7 +234,7 @@ or * value - string value (max: 20 characters on nRF8001 and nRF51822) - Please take note that in order to initiate a characteristic containing one or more 0's (i.e. not a real string) you should use a combination of + Please take note that in order to initialise a characteristic containing one or more 0's (i.e. not a real string) you should use a combination of ``` BLECharacteristic(const char* uuid, unsigned char properties, sizeof(value)); BLECharacteristic.setValue((unsigned char*)value, sizeof(value));