Skip to content
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

Return different writable streams depending on whether writing without response is permitted #19

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

agrippa
Copy link

@agrippa agrippa commented Aug 17, 2024

When constructing a new transport, it seems that on some systems writing without a response is not permitted (based on the writeWithoutResponse property: https://developer.mozilla.org/en-US/docs/Web/API/BluetoothCharacteristicProperties).

This PR retains the current default behavior (without response) for boards that support it, but adds support for boards where this is not enabled.

},
});

return { label, readable,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we defer creation of the two writables until this ternary resolves, to avoid the spurious object creation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just made an update, how does that look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants