-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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(); |
There was a problem hiding this comment.
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
if (connection instanceof MicrobitRadioBridgeConnection) { | ||
connection.setRemoteDeviceId(0); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
This will allow us to create a radio bridge connection instance upfront.