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

[#319] Added possibility to change default operation timeout. #321

Merged
merged 8 commits into from
Nov 17, 2017

Conversation

uKL
Copy link
Collaborator

@uKL uKL commented Nov 16, 2017

[#319] Added possibility to change default operation timeout.

@uKL uKL added this to the 1.5.0 milestone Nov 16, 2017
* @throws BleGattCallbackTimeoutException emitted when an internal timeout for connection has been reached. The operation will
* timeout in direct mode (autoConnect = false) after 35 seconds.
*/
Observable<RxBleConnection> establishConnection(ConnectionSetup connectionSetup);
Copy link
Owner

Choose a reason for hiding this comment

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

I wanted to wait with the signature establishConnection(ConnectionSetup) till the new Connection API will be ready
Reasoning:

  • establishConnection(ConnectionSetup) is the easiest possible entry point
  • if we will use it with now—we will not be able to introduce the new Connection API without coming up with a new name for the function

Maybe we could use something like Observable<RxBleConnection> establishConnection(boolean autoConnect, TimeoutSetup timeoutSetup) for now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's ok for me.

settings.gradle Outdated
@@ -1,3 +1,4 @@
include ':rxandroidble', ':mockrxandroidble', ':sample'
include ':rxandroidble'
Copy link
Owner

Choose a reason for hiding this comment

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

is this relevant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, a bug. Will revert.

@uKL uKL force-pushed the feature/customizable_operation_timeout branch from 571b454 to ef0139d Compare November 17, 2017 10:13
@uKL uKL force-pushed the feature/customizable_operation_timeout branch from ef0139d to dde7f08 Compare November 17, 2017 10:15
@uKL
Copy link
Collaborator Author

uKL commented Nov 17, 2017

@dariuszseweryn Ready to be checked again.

1 similar comment
@uKL
Copy link
Collaborator Author

uKL commented Nov 17, 2017

@dariuszseweryn Ready to be checked again.

* @throws BleGattCallbackTimeoutException emitted when an internal timeout for connection has been reached. The operation will
* timeout in direct mode (autoConnect = false) after 35 seconds.
*/
Observable<RxBleConnection> establishConnection(boolean autoConnect, TimeoutSetup operationTimeoutSetup);
Copy link
Owner

Choose a reason for hiding this comment

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

Please add @NonNull annotation

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

this.timeUnit = timeUnit;
this.timeout = timeout;
}
}
Copy link
Owner

Choose a reason for hiding this comment

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

new line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

public final TimeUnit timeUnit;
public final long timeout;

public TimeoutSetup(long timeout, TimeUnit timeUnit) {
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe just Timeout?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok

@uKL uKL merged commit 5f48dd9 into master Nov 17, 2017
@uKL uKL deleted the feature/customizable_operation_timeout branch November 17, 2017 11:23
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