Skip to content

Commit d5b2c3d

Browse files
committed
DEV-574 #time 10m restored some formatting and improved console print
1 parent db28957 commit d5b2c3d

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

ShimmerDriver/src/main/java/com/shimmerresearch/bluetooth/ShimmerBluetooth.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,8 +1010,10 @@ else if(isSupportedInStreamCmds() && bufferTemp[getPacketSizeWithCrc()+2]==INSTR
10101010
//TODO: ACK in bufferTemp[0] not handled
10111011
//else if
10121012
else {
1013-
printLogDataForDebugging("Packet syncing problem:\tExpected: " + (getPacketSizeWithCrc()+2) + "bytes. Buffer contains " + mByteArrayOutputStream.size() + "bytes"
1014-
+ "\nBuffer = " + UtilShimmer.bytesToHexStringWithSpacesFormatted(mByteArrayOutputStream.toByteArray()));
1013+
printLogDataForDebugging("Unexpected packet header bytes. Expected size: " + getPacketSizeWithCrc()
1014+
+ ", Packet 1 header: " + UtilShimmer.byteToHexStringFormatted(bufferTemp[0])
1015+
+ ", Packet 2 header: " + UtilShimmer.byteToHexStringFormatted(bufferTemp[getPacketSizeWithCrc() + 1])
1016+
+ "\nBuffer: " + UtilShimmer.bytesToHexStringWithSpacesFormatted(mByteArrayOutputStream.toByteArray()));
10151017
discardBufferBytesToNextPacket(); // Skip to start of next packet
10161018
}
10171019
}

ShimmerDriver/src/main/java/com/shimmerresearch/driver/ObjectCluster.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public enum OBJECTCLUSTER_TYPE{
156156
public int mIndexCal = 0;
157157
public int mIndexUncal = 0;
158158
public boolean mEnableArraysDataStructure = false;
159-
159+
160160
public class SensorDataPerType {
161161

162162
public SensorDataPerType(int length) {

ShimmerDriver/src/main/java/com/shimmerresearch/driver/ShimmerObject.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ public String toString() {
785785
protected boolean mPastGSRFirstTime=true; // this is to fix a bug with SDLog v0.9
786786

787787
// ---------- GSR end ------------------
788-
788+
789789
public ObjectCluster setLSLTimeIfAvailable(ObjectCluster ojc) {
790790
return ojc;
791791
}
@@ -923,6 +923,7 @@ public ObjectCluster buildMsg(byte[] newPacket, COMMUNICATION_TYPE fwType, boole
923923

924924
if (getHardwareVersion()==HW_ID.SHIMMER_SR30 || getHardwareVersion()==HW_ID.SHIMMER_3 || getHardwareVersion()==HW_ID.SHIMMER_3R
925925
|| getHardwareVersion()==HW_ID.SHIMMER_GQ_802154_LR || getHardwareVersion()==HW_ID.SHIMMER_GQ_802154_NR || getHardwareVersion()==HW_ID.SHIMMER_2R_GQ){
926+
926927
parseTimestampShimmer3(fwType, objectCluster, uncalibratedData, uncalibratedDataUnits, calibratedData, calibratedDataUnits, sensorNames, newPacketInt);
927928

928929
//OFFSET

0 commit comments

Comments
 (0)