-
Notifications
You must be signed in to change notification settings - Fork 64
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
setup_standard_scan overrides your callbacks. #14
Comments
Good point. I'll have to consider the best design here.
sent from phone.
…On 21 Apr 2017 10:23, "Bartłomiej Żarnowski" ***@***.***> wrote:
This is unacceptable from perspective of user, if I set my callbacks on
object then I'm not expecting some magic overwrites of it. Especially if I
must call this method to get characteristics. I believe there should be
channing of callbacks or listener approach or 2 levels of callbacks
(special case of chainning).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#14>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABGW624dZoYaBTXE9_mdkUcqIq37kZpnks5ryHWSgaJpZM4NEEJw>
.
|
Out of interest, which callbacks were you setting that were getting
overridden?
PS replies are going to be a bit sporadic for a while.
sent from phone.
…On 21 Apr 2017 14:08, "Edward Rosten" ***@***.***> wrote:
Good point. I'll have to consider the best design here.
sent from phone.
On 21 Apr 2017 10:23, "Bartłomiej Żarnowski" ***@***.***>
wrote:
> This is unacceptable from perspective of user, if I set my callbacks on
> object then I'm not expecting some magic overwrites of it. Especially if I
> must call this method to get characteristics. I believe there should be
> channing of callbacks or listener approach or 2 levels of callbacks
> (special case of chainning).
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#14>, or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABGW624dZoYaBTXE9_mdkUcqIq37kZpnks5ryHWSgaJpZM4NEEJw>
> .
>
|
OnConnect/OnDisconnect |
Huh I forgot that it overrode disconnect. I can see what you mean about
connect, though if you're scanning then the device isn't really ready to
use until the standard scan is compete. I believe you can set up a callback
there so you get notified when the scan has competed.
Thinking about it, the standard scan setup could override the callback, but
keep a copy of the old one so that it can then call it.
Or maybe it should take a second, optional argument with the on connected
callback.
sent from phone.
On 21 Apr 2017 14:12, "Bartłomiej Żarnowski" <[email protected]> wrote:
OnConnect/OnDisconnect
I've written wrapper around your library to close it into communication
abstraction. And I need to know if my IO channel is in
connected/disconnected state so I have to react on those callbacks.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABGW62Uc32enmGesHr0Rta8NbGPtFw0xks5ryKtOgaJpZM4NEEJw>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is unacceptable from perspective of user, if I set my callbacks on object then I'm not expecting some magic overwrites of it. Especially if I must call this method to get characteristics. I believe there should be channing of callbacks or listener approach or 2 levels of callbacks (special case of chainning).
The text was updated successfully, but these errors were encountered: