From 2b758e05c72efeb982607ac4238aad7c8ce1dce9 Mon Sep 17 00:00:00 2001 From: h2zero Date: Fri, 26 Aug 2022 19:54:43 -0600 Subject: [PATCH] Fix client example. --- examples/Advanced/NimBLE_Client/main/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/Advanced/NimBLE_Client/main/main.cpp b/examples/Advanced/NimBLE_Client/main/main.cpp index f754b94..8971355 100644 --- a/examples/Advanced/NimBLE_Client/main/main.cpp +++ b/examples/Advanced/NimBLE_Client/main/main.cpp @@ -33,8 +33,9 @@ class ClientCallbacks : public NimBLEClientCallbacks { pClient->updateConnParams(120,120,0,45); }; - void onDisconnect(NimBLEClient* pClient) { - printf("%s Disconnected - Starting scan\n", pClient->getPeerAddress().toString().c_str()); + void onDisconnect(NimBLEClient* pClient, int reason) { + printf("%s Disconnected, reason = %d - Starting scan\n", + pClient->getPeerAddress().toString().c_str(), reason); NimBLEDevice::getScan()->start(scanTime, scanEndedCB); };