Skip to content

Commit 67583e8

Browse files
authored
Return size_t instead of uint8_t from BLECharacteristic::getLength(). Allows large MTU to be used. (#5687)
1 parent 108e467 commit 67583e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/BLE/src/BLECharacteristic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ uint8_t* BLECharacteristic::getData() {
191191
* @brief Retrieve the current length of the data of the characteristic.
192192
* @return Amount of databytes of the characteristic.
193193
*/
194-
uint8_t BLECharacteristic::getLength() {
194+
size_t BLECharacteristic::getLength() {
195195
return m_value.getLength();
196196
} // getLength
197197

libraries/BLE/src/BLECharacteristic.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class BLECharacteristic {
6262
BLEUUID getUUID();
6363
std::string getValue();
6464
uint8_t* getData();
65-
uint8_t getLength();
65+
size_t getLength();
6666

6767
void indicate();
6868
void notify(bool is_notification = true);

0 commit comments

Comments
 (0)