We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c81df43 commit 166debbCopy full SHA for 166debb
src/local/BLELocalCharacteristic.cpp
@@ -119,9 +119,9 @@ int BLELocalCharacteristic::writeValue(const uint8_t value[], int length)
119
}
120
121
if ((_properties & BLEIndicate) && (_cccdValue & 0x0002)) {
122
- return ATT.handleInd(valueHandle(), _value,&_valueLength);
+ return ATT.handleInd(valueHandle(), _value,_valueLength);
123
} else if ((_properties & BLENotify) && (_cccdValue & 0x0001)) {
124
- return ATT.handleNotify(valueHandle(), _value, &_valueLength);
+ return ATT.handleNotify(valueHandle(), _value, _valueLength);
125
126
127
if (_broadcast) {
@@ -169,7 +169,7 @@ int BLELocalCharacteristic::write(const uint8_t value[], int length)
169
uint16_t serviceUuid = GATT.serviceUuidForCharacteristic(this);
170
171
BLE.setAdvertisedServiceData(serviceUuid, value, length);
172
-
+
173
if (!ATT.connected() && GAP.advertising()) {
174
BLE.advertise();
175
src/utility/ATT.cpp
@@ -582,6 +582,11 @@ BLEDevice ATTClass::central()
582
return BLEDevice();
583
584
585
+bool ATTClass::handleNotify(uint16_t handle, const uint8_t *value, int length)
586
+{
587
+ return handleNotify(handle, value, (uint16_t*)&length);
588
+}
589
590
bool ATTClass::handleNotify(uint16_t handle, const uint8_t* value, uint16_t *length)
591
{
592
int numNotifications = 0;
@@ -613,6 +618,11 @@ bool ATTClass::handleNotify(uint16_t handle, const uint8_t* value, uint16_t *len
613
618
return (numNotifications > 0);
614
619
615
620
621
+bool ATTClass::handleInd(uint16_t handle, const uint8_t *value, int length)
622
623
+ return handleInd(handle, value, (uint16_t*)&length);
624
625
616
626
bool ATTClass::handleInd(uint16_t handle, const uint8_t* value, uint16_t *length)
617
627
628
int numIndications = 0;
src/utility/ATT.h
@@ -83,7 +83,9 @@ class ATTClass {
83
84
virtual BLEDevice central();
85
86
+ virtual bool handleNotify(uint16_t handle, const uint8_t* value, int length);
87
virtual bool handleNotify(uint16_t handle, const uint8_t* value, uint16_t *length);
88
+ virtual bool handleInd(uint16_t handle, const uint8_t* value, int length);
89
virtual bool handleInd(uint16_t handle, const uint8_t* value, uint16_t *length);
90
91
virtual void setEventHandler(BLEDeviceEvent event, BLEDeviceEventHandler eventHandler);
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments