mirror of
https://github.com/h2zero/esp-nimble-cpp.git
synced 2024-12-26 04:30:46 +01:00
Revert 42201d4, app should specify response when (un)subscribing. (#470)
In some applications it is benefitial to not write to the 0x2902 descriptor with response, particulary in cases where the device sends notifications regardless of subscribing. This reverts the previous change to the behavior of the (un)subscribe call which forced writing with response, the application should decide if it's required.
This commit is contained in:
parent
d9ee8717a6
commit
b33a761e62
2 changed files with 2 additions and 3 deletions
|
@ -616,7 +616,6 @@ bool NimBLERemoteCharacteristic::setNotify(uint16_t val, notify_callback notifyC
|
|||
|
||||
NIMBLE_LOGD(LOG_TAG, "<< setNotify()");
|
||||
|
||||
response = true; // Always write with response as per Bluetooth core specification.
|
||||
return desc->writeValue((uint8_t *)&val, 2, response);
|
||||
} // setNotify
|
||||
|
||||
|
|
|
@ -73,8 +73,8 @@ public:
|
|||
|
||||
bool subscribe(bool notifications = true,
|
||||
notify_callback notifyCallback = nullptr,
|
||||
bool response = true);
|
||||
bool unsubscribe(bool response = true);
|
||||
bool response = false);
|
||||
bool unsubscribe(bool response = false);
|
||||
bool registerForNotify(notify_callback notifyCallback,
|
||||
bool notifications = true,
|
||||
bool response = true)
|
||||
|
|
Loading…
Reference in a new issue