Skip to content

Commit 0ea4f61

Browse files
authored
Merge pull request #94 from ShimmerEngineering/DEV-360
DEV-360_fix_for_status_and_uprev
2 parents 6cfce0a + 94396fa commit 0ea4f61

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ publishing {
8282
bar(MavenPublication) {
8383
groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
8484
artifactId = 'shimmerandroidinstrumentdriver' // Replace with the name of your package
85-
version = '3.2.2_beta' // Replace with your package version
85+
version = '3.2.3_beta' // Replace with your package version
8686
artifact("$buildDir/outputs/aar/${getArtificatId()}-release.aar")
8787
}
8888
}

ShimmerAndroidInstrumentDriver/ShimmerAndroidInstrumentDriver/src/main/java/com/shimmerresearch/android/Shimmer.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -890,12 +890,20 @@ protected void processInstreamResponse(boolean shouldClearCrcFromBuffer) {
890890
}
891891
} else if (inStreamResponseCommand == STATUS_RESPONSE) {
892892
printLogDataForDebugging("IN STREAM: STATUS_RESPONSE");
893-
bufferTemp = getDataFromArrayOutputStream(5);
893+
int length = 5;
894+
int statusBytesToRead = 0;
895+
if(isSupportedUSBPluggedInStatus()) {
896+
length+=1;
897+
statusBytesToRead = 2;
898+
} else {
899+
statusBytesToRead = 1;
900+
}
901+
bufferTemp = getDataFromArrayOutputStream(length);
894902
if (bufferTemp != null) {
895-
byte[] responseData = new byte[1];
903+
byte[] responseData = new byte[statusBytesToRead];
896904
System.arraycopy(bufferTemp, bufferTemp.length - responseData.length, responseData, 0, responseData.length);
897905
if (responseData != null) {
898-
parseStatusByte(responseData[0]);
906+
parseStatusByte(responseData);
899907

900908
if (!isSupportedRtcStateInStatus()) {
901909
if (!mIsSensing && !isInitialised()) {

ShimmerAndroidInstrumentDriver/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,15 @@ allprojects {
7878
implementation 'java3d:vecmath:1.3.1'
7979
implementation 'com.android.support:appcompat-v7:26.1.0'
8080
implementation 'com.github.Jasonchenlijian:FastBle:2.4.0'
81-
implementation (group: 'com.shimmerresearch', name: 'shimmerbluetoothmanager', version:'0.11.3_beta'){
81+
implementation (group: 'com.shimmerresearch', name: 'shimmerbluetoothmanager', version:'0.11.4_beta'){
8282

8383
// excluding org.json which is provided by Android
8484
exclude group: 'io.netty'
8585
exclude group: 'com.google.protobuf'
8686
exclude group: 'org.apache.commons.math'
8787
}
8888

89-
implementation (group: 'com.shimmerresearch', name: 'shimmerdriver', version:'0.11.3_beta'){
89+
implementation (group: 'com.shimmerresearch', name: 'shimmerdriver', version:'0.11.4_beta'){
9090

9191
// excluding org.json which is provided by Android
9292
exclude group: 'io.netty'

0 commit comments

Comments
 (0)