Skip to content

Remove connect options in favour of setters #12

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

Merged
merged 5 commits into from
Jul 24, 2024

Conversation

microbit-robert
Copy link
Contributor

This will allow us to create a radio bridge connection instance upfront.

This will allow us to create a radio bridge connection  instance
upfront.
@@ -121,7 +118,7 @@ const createConnectSection = (type: ConnectionType): Section => {
"button",
{
onclick: () => {
void connection.connect({ name: name || undefined });
void connection.connect();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll need to come back to this and set the name filter for the Bluetooth connection if a name has been provided.

src/demo.ts Outdated
Comment on lines 58 to 60
if (connection instanceof MicrobitRadioBridgeConnection) {
connection.setRemoteDeviceId(0);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Making the demo a bit worse again.

Copy link
Contributor

Choose a reason for hiding this comment

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

We may as well do this at the point we create the connection when we know its type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@microbit-matt-hillsdon
Copy link
Contributor

As discussed in person this API should probably change but let's get our internal clients using it and evolve it with usage in mind.

@microbit-matt-hillsdon microbit-matt-hillsdon merged commit a3c23c4 into main Jul 24, 2024
1 check passed
@microbit-matt-hillsdon microbit-matt-hillsdon deleted the no-connect-options branch July 24, 2024 08:52
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