Fix client example.

This commit is contained in:
h2zero 2022-08-26 19:54:43 -06:00
parent bfe68f4a91
commit 2b758e05c7

View file

@ -33,8 +33,9 @@ class ClientCallbacks : public NimBLEClientCallbacks {
pClient->updateConnParams(120,120,0,45); pClient->updateConnParams(120,120,0,45);
}; };
void onDisconnect(NimBLEClient* pClient) { void onDisconnect(NimBLEClient* pClient, int reason) {
printf("%s Disconnected - Starting scan\n", pClient->getPeerAddress().toString().c_str()); printf("%s Disconnected, reason = %d - Starting scan\n",
pClient->getPeerAddress().toString().c_str(), reason);
NimBLEDevice::getScan()->start(scanTime, scanEndedCB); NimBLEDevice::getScan()->start(scanTime, scanEndedCB);
}; };