Skip to content

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

Open
agrippa wants to merge 3 commits intozmkfirmware:mainfrom
agrippa:write_without_response
Open

Return different writable streams depending on whether writing without response is permitted#19
agrippa wants to merge 3 commits intozmkfirmware:mainfrom
agrippa:write_without_response

Conversation

@agrippa
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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