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

Add first batch unit tests #55

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

smoy
Copy link

@smoy smoy commented Jul 23, 2015

I have a fork of Monkey.Robotics and finally start adding some tests on the API. This maybe helpful for others who want to tinkle with the project and need regression testing.

smoy added 22 commits May 15, 2015 07:48
When one wants to connect multiple BLE devices, the singleton approach
doesn't work well. In addition, the adapter class member inside GattCallback
is not being used, it is deleted as well.

The access modifier of _gatt and _gattcallback inside Device is changed from
protected to internal. Such that, the Adapter instance can update those fields
upon connection attempt.
* Eliminte the need to create new device instance
* Wire up RSSI to the device
* Get DeviceState from the profileState given by GattCallback
we can remove them when the method finishes its work.

Prior to the change, upon re-entry of ServiceList, the
services entry are added more once because we did not
remove previous added delegate.
… in interest.

* Robustify removing delegates upon device disconnection
* During attempt to connect, if an device already has a Gatt instance, tear it down before
trying to connect.
* During attempt to disconnect, tear down the gatt instance to free all the android resources
…evice instance instead.

* This is in preparation to allow read/write of characteristic to check
if a device is disconnected before attempting those read/write actions.
* Minimize the number of new Device instance that is constructed
* Delay Service discovered event registation until Discover service is called
* Remove DiscoveredService handler once we receive the callback from OnDiscoveredService
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.

None yet

1 participant