Skip to content

Commit 7322196

Browse files
porubcinjpennam
authored andcommitted
Add BLEPermission Support to BLEStringCharacteristic
5 years ago, support for encryption was added by #156. Currently, the BLEEncryption tag needs to be added to require proper encrypted bluetooth pairing. It is possible to add this tag to all other kinds of characteristics except String characteristics. BLEStringCharacteristic's constructor calls BLECharacteristic's constructor, and BLECharacteristic uses a uint16_t instead of a uint8_t. This PR simply changes the properties attribute of BLEStringCharacteristic to match the width of the permissions attribute of BLECharacteristic (from 8 to 16 bits) to support the BLEPermission tags in BLEProperty.h.
1 parent c91c02c commit 7322196

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/BLEStringCharacteristic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "BLEStringCharacteristic.h"
2121

22-
BLEStringCharacteristic::BLEStringCharacteristic(const char* uuid, unsigned char properties, int valueSize) :
22+
BLEStringCharacteristic::BLEStringCharacteristic(const char* uuid, unsigned int properties, int valueSize) :
2323
BLECharacteristic(uuid, properties, valueSize)
2424
{
2525
}

src/BLEStringCharacteristic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class BLEStringCharacteristic : public BLECharacteristic
2828
{
2929
public:
30-
BLEStringCharacteristic(const char* uuid, unsigned char properties, int valueSize);
30+
BLEStringCharacteristic(const char* uuid, unsigned int properties, int valueSize);
3131

3232
int writeValue(const String& value);
3333
int setValue(const String& value) { return writeValue(value); }

0 commit comments

Comments
 (0)