-
Notifications
You must be signed in to change notification settings - Fork 217
disconnect() does not trigger callback #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Looks like the |
Hi @rmlearney-digicatapult , if (BLE.disconnect()) {
digitalWrite(LED_BUILTIN, LOW);
} Similarly, the same approach is used for connection callbacks. If the connection is coming from other devices the callback is triggered, while if the connection is requested by our device the callback is not triggered. |
Hi @polldo may I suggest you deprecate I don't understand why the user would care about the source of disconnection when wanting to trigger a callback to handle disconnections. Could you maybe give me a use case, because as a user I just want to use the |
Hi @rmlearney-digicatapult , |
Thank you @polldo - I completely agree that the reason for disconnection would be useful information |
Example:
Expected behaviour - disconnection from central should trigger callback and turn off LED
Actual behaviour - disconnection from central with disconnect() method does not trigger callback
The text was updated successfully, but these errors were encountered: