diff --git a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle index 037384f..71ac92b 100644 --- a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle +++ b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle @@ -82,7 +82,7 @@ publishing { bar(MavenPublication) { groupId = 'com.shimmerresearch' // Replace with your package's group/organization name artifactId = 'shimmerandroidinstrumentdriver' // Replace with the name of your package - version = '3.2.2_beta' // Replace with your package version + version = '3.2.3_beta' // Replace with your package version artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar") } } diff --git a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/Shimmer.java b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/Shimmer.java index 68b32e6..0fa52b8 100644 --- a/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/Shimmer.java +++ b/ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/Shimmer.java @@ -890,12 +890,20 @@ protected void processInstreamResponse(boolean shouldClearCrcFromBuffer) { } } else if (inStreamResponseCommand == STATUS_RESPONSE) { printLogDataForDebugging("IN STREAM: STATUS_RESPONSE"); - bufferTemp = getDataFromArrayOutputStream(5); + int length = 5; + int statusBytesToRead = 0; + if(isSupportedUSBPluggedInStatus()) { + length+=1; + statusBytesToRead = 2; + } else { + statusBytesToRead = 1; + } + bufferTemp = getDataFromArrayOutputStream(length); if (bufferTemp != null) { - byte[] responseData = new byte[1]; + byte[] responseData = new byte[statusBytesToRead]; System.arraycopy(bufferTemp, bufferTemp.length - responseData.length, responseData, 0, responseData.length); if (responseData != null) { - parseStatusByte(responseData[0]); + parseStatusByte(responseData); if (!isSupportedRtcStateInStatus()) { if (!mIsSensing && !isInitialised()) { diff --git a/ShimmerAndroidInstrumentDriver/build.gradle b/ShimmerAndroidInstrumentDriver/build.gradle index 377be25..36e1797 100644 --- a/ShimmerAndroidInstrumentDriver/build.gradle +++ b/ShimmerAndroidInstrumentDriver/build.gradle @@ -78,7 +78,7 @@ allprojects { implementation 'java3d:vecmath:1.3.1' implementation 'com.android.support:appcompat-v7:26.1.0' implementation 'com.github.Jasonchenlijian:FastBle:2.4.0' - implementation (group: 'com.shimmerresearch', name: 'shimmerbluetoothmanager', version:'0.11.3_beta'){ + implementation (group: 'com.shimmerresearch', name: 'shimmerbluetoothmanager', version:'0.11.4_beta'){ // excluding org.json which is provided by Android exclude group: 'io.netty' @@ -86,7 +86,7 @@ allprojects { exclude group: 'org.apache.commons.math' } - implementation (group: 'com.shimmerresearch', name: 'shimmerdriver', version:'0.11.3_beta'){ + implementation (group: 'com.shimmerresearch', name: 'shimmerdriver', version:'0.11.4_beta'){ // excluding org.json which is provided by Android exclude group: 'io.netty'