8000 Fix #380 characteristic written returns incorrect value after first c… · uberfurer/corelibs-arduino101@fe14b8b · GitHub
[go: up one dir, main page]

Skip to content

Commit fe14b8b

Browse files
sgbihusys_maker
authored and
sys_maker
committed
Fix arduino#380 characteristic written returns incorrect value after first connect
1. Not set the flage when local device try to set the value. 2. Changed file libraries/CurieBLE/src/internal/BLECharacteristicImp.cpp
1 parent 0eac6a0 commit fe14b8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/CurieBLE/src/internal/BLECharacteristicImp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ bool
260260
BLECharacteristicImp::setValue(const unsigned char value[], uint16_t length)
261261
{
262262
_setValue(value, length, 0);
263+
_value_updated = true;
263264
if (BLEUtils::isLocalBLE(_ble_device) == true)
264265
{
265266
// GATT server
@@ -555,7 +556,6 @@ BLECharacteristicImp::_setValue(const uint8_t value[], uint16_t length, uint16_t
555556
}
556557
}
557558

558-
_value_updated = true;
559559
memcpy(_value + offset, value, length);
560560
_value_length = length;
561561
}

0 commit comments

Comments
 (0)
0