change BLECLientCharacteristic notify callback signature
from notify_cb(BLEClientCharacteristic& chr, uint8_t* data, uint16_t len) to notify_cb(BLEClientCharacteristic* chr, uint8_t* data, uint16_t len) Added
This commit is contained in:
1 parent
4747a9b7ae
commit
d0655b369d
9 files changed
+29
-23
No files matched your search
@@ -408,10 +408,11 @@ void BLEClientCharacteristic::_eventHandler(ble_evt_t* evt)
|
||||
if (!data) return;
|
||||
memcpy(data, hvx->data, hvx->len);
|
||||
|
||||
// data is free by callback
|
||||
ada_callback(data, _notify_cb, this, data, hvx->len);
|
||||
}else
|
||||
{
|
||||
_notify_cb(*this, hvx->data, hvx->len);
|
||||
_notify_cb(this, hvx->data, hvx->len);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -426,10 +427,11 @@ void BLEClientCharacteristic::_eventHandler(ble_evt_t* evt)
|
||||
if (!data) return;
|
||||
memcpy(data, hvx->data, hvx->len);
|
||||
|
||||
ada_callback(data, _notify_cb, this, data, hvx->len);
|
||||
// data is free by callback
|
||||
ada_callback(data, _indicate_cb, this, data, hvx->len);
|
||||
}else
|
||||
{
|
||||
_notify_cb(*this, hvx->data, hvx->len);
|
||||
_indicate_cb(this, hvx->data, hvx->len);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user