Skip to content

Commit

Permalink
新增停止串口,bug修改
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxudong committed May 20, 2020
1 parent b62cd1b commit b560535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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 10
versionName "1.2.6"
versionCode 11
versionName "1.2.7"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
Expand Down
3 changes: 2 additions & 1 deletion serial/src/main/java/org/sheedon/serial/SerialClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public Observable newObservable(Request request) {
}

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

Expand Down

0 comments on commit b560535

Please sign in to comment.