forked from h2zero/esp-nimble-cpp
Adds the reason code as a parameter to the client onDisconnect callback. * Update examples/docs.
This commit is contained in:
@@ -43,7 +43,9 @@ class MyClientCallback : public BLEClientCallbacks {
|
||||
void onConnect(BLEClient* pclient) {
|
||||
}
|
||||
|
||||
void onDisconnect(BLEClient* pclient) {
|
||||
/** onDisconnect now takes a reason parameter to indicate the reason for disconnection
|
||||
void onDisconnect(BLEClient* pclient) { */
|
||||
void onDisconnect(BLEClient* pclient, int reason) {
|
||||
connected = false;
|
||||
printf("onDisconnect");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user