Skip to content

Commit

Permalink
Dont echo Writes to Characteristic with BLEWriteWithoutResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
neroroxxx authored Mar 20, 2019
1 parent c074f30 commit 33d5c05
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/BLECharacteristic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ bool BLECharacteristic::written() {
}

void BLECharacteristic::setValue(BLECentral& central, const unsigned char value[], unsigned char length) {
this->setValue(value, length);
//https://github.com/sandeepmistry/arduino-BLEPeripheral/pull/174
if(_properties & BLEWriteWithoutResponse){
this->_valueLength = min(length, this->_valueSize);
memcpy(this->_value, value, this->_valueLength);
} else {
this->setValue(value, length);
}

this->_written = true;

Expand Down

0 comments on commit 33d5c05

Please sign in to comment.