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

feature/core-bluetooth #52

Merged
merged 63 commits into from
Sep 12, 2019
Merged

feature/core-bluetooth #52

merged 63 commits into from
Sep 12, 2019

Conversation

ec2
Copy link
Member

@ec2 ec2 commented Sep 9, 2019

Bi-directional message sending is working. Need to write more tests and test for multiple devices.

Relevant issues:
closes #25
closes #26

if let char = characteristics?.first(where: { $0.uuid == CoreBluetoothTransport.receiveCharacteristicUUID }) {
peripherals[id] = (peripheral, char)
peripherals[id]?.peripheral.setNotifyValue(true, for: char)
peers.append(Peer(id: id, services: [UBID]())) // @TODO SERVICES
Copy link

Choose a reason for hiding this comment

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

TODOs should be resolved (SERVICES).

if let char = characteristics?.first(where: { $0.uuid == CoreBluetoothTransport.receiveCharacteristicUUID }) {
peripherals[id] = (peripheral, char)
peripherals[id]?.peripheral.setNotifyValue(true, for: char)
peers.append(Peer(id: id, services: [UBID]())) // @todo we may need to do some handshake to obtain services from a peer.
Copy link

Choose a reason for hiding this comment

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

Line should be 120 characters or less: currently 132 characters

@ec2 ec2 marked this pull request as ready for review September 9, 2019 20:35
@ec2 ec2 requested review from decanus and GregTheGreek September 9, 2019 20:38
if sends > 0 {
return
}
}
}

_ = send(message, transport: transport, peers: peers)
_ = send(message, data: data, transport: transport, peers: peers)

Choose a reason for hiding this comment

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

message type?

Copy link
Contributor

Choose a reason for hiding this comment

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

What?

Copy link
Member Author

Choose a reason for hiding this comment

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

:)

@ec2 ec2 mentioned this pull request Sep 10, 2019
decanus
decanus previously approved these changes Sep 10, 2019
@codeclimate
Copy link

codeclimate bot commented Sep 11, 2019

Code Climate has analyzed commit 6070337 and detected 0 issues on this pull request.

View more on Code Climate.

@ec2 ec2 merged commit 5f5efdd into master Sep 12, 2019
@ec2 ec2 deleted the feature/core-bluetooth branch September 12, 2019 15:05
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.

Message passing Core Bluetooth transport implementation
3 participants