mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-11-22 13:10:55 +01:00
Add response parameter to NimBLEClient::setValue
This commit is contained in:
parent
77f477f428
commit
de59693f0f
2 changed files with 3 additions and 3 deletions
|
@ -621,7 +621,7 @@ std::string NimBLEClient::getValue(const NimBLEUUID &serviceUUID, const NimBLEUU
|
||||||
* @returns true if successful otherwise false
|
* @returns true if successful otherwise false
|
||||||
*/
|
*/
|
||||||
bool NimBLEClient::setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID,
|
bool NimBLEClient::setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID,
|
||||||
const std::string &value)
|
const std::string &value, bool response)
|
||||||
{
|
{
|
||||||
NIMBLE_LOGD(LOG_TAG, ">> setValue: serviceUUID: %s, characteristicUUID: %s",
|
NIMBLE_LOGD(LOG_TAG, ">> setValue: serviceUUID: %s, characteristicUUID: %s",
|
||||||
serviceUUID.toString().c_str(), characteristicUUID.toString().c_str());
|
serviceUUID.toString().c_str(), characteristicUUID.toString().c_str());
|
||||||
|
@ -632,7 +632,7 @@ bool NimBLEClient::setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &cha
|
||||||
if(pService != nullptr) {
|
if(pService != nullptr) {
|
||||||
NimBLERemoteCharacteristic* pChar = pService->getCharacteristic(characteristicUUID);
|
NimBLERemoteCharacteristic* pChar = pService->getCharacteristic(characteristicUUID);
|
||||||
if(pChar != nullptr) {
|
if(pChar != nullptr) {
|
||||||
ret = pChar->writeValue(value);
|
ret = pChar->writeValue(value, response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
size_t deleteService(const NimBLEUUID &uuid);
|
size_t deleteService(const NimBLEUUID &uuid);
|
||||||
std::string getValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID);
|
std::string getValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID);
|
||||||
bool setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID,
|
bool setValue(const NimBLEUUID &serviceUUID, const NimBLEUUID &characteristicUUID,
|
||||||
const std::string &value);
|
const std::string &value, bool response = false);
|
||||||
NimBLERemoteCharacteristic* getCharacteristic(const uint16_t handle);
|
NimBLERemoteCharacteristic* getCharacteristic(const uint16_t handle);
|
||||||
bool isConnected();
|
bool isConnected();
|
||||||
void setClientCallbacks(NimBLEClientCallbacks *pClientCallbacks,
|
void setClientCallbacks(NimBLEClientCallbacks *pClientCallbacks,
|
||||||
|
|
Loading…
Reference in a new issue