Skip to content

Commit

Permalink
新增停止串口
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxudong committed May 20, 2020
1 parent 87a4e6e commit 78f7a78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions serial/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ android {
defaultConfig {
minSdkVersion 15
targetSdkVersion 28
versionCode 8
versionName "1.2.4"
versionCode 9
versionName "1.2.5"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand Down
5 changes: 5 additions & 0 deletions serial/src/main/java/org/sheedon/serial/SerialClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ public Observable newObservable(Request request) {
return RealObservable.newRealObservable(this, request);
}

public void destroy() {
port.closeSerialPort();
port = null;
}


@Override
public void onCallback(ResponseBody data) {
Expand Down

0 comments on commit 78f7a78

Please sign in to comment.