Skip to content

Commit 440dc3c

Browse files
authored
Merge pull request #219 from ShimmerEngineering/DEV-289
DEV-289
2 parents 5031e54 + c2723cc commit 440dc3c

6 files changed

Lines changed: 22 additions & 4 deletions

File tree

ShimmerBluetoothManager/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ publishing {
2525

2626
groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
2727
artifactId = 'shimmerbluetoothmanager' // Replace with the name of your package
28-
version = '0.11.2_beta' // Replace with your package version
28+
version = '0.11.3_beta' // Replace with your package version
2929

3030
// Jar publication
3131
//(

ShimmerDriver/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ publishing {
4747

4848
groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
4949
artifactId = 'shimmerdriver' // Replace with the name of your package
50-
version = '0.11.2_beta' // Replace with your package version
50+
version = '0.11.3_beta' // Replace with your package version
5151

5252
// Jar publication
5353
//(

ShimmerDriver/src/main/java/com/shimmerresearch/driverUtilities/UtilShimmer.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,10 @@ public static String longToHexString(long number, int numBytes) {
10641064
}
10651065
return bytesToHexString(bytesArray);
10661066
}
1067-
1067+
public static String convertLongToHexString(long longNumber) {
1068+
byte[] bytesArray = convertLongToByteArray(longNumber);
1069+
return bytesToHexString(bytesArray);
1070+
}
10681071
public static String doubleArrayToString(double[][] doubleArray) {
10691072
String returnString = "";
10701073
for(int x=0;x<doubleArray.length;x++){

ShimmerDriver/src/main/java/com/shimmerresearch/driverUtilities/Version.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ public static int[] parseVersion(String version) {
4545
}
4646
return null; // Return null if the format is invalid
4747
}
48+
49+
public String getVersion() {
50+
return mMajor+"."+mMinor+"."+mInternal;
51+
}
4852
}

ShimmerDriver/src/test/java/com/shimmerresearch/driverUtilities/API_00007_UtilShimmerTest.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ public void testRoundTwoDecimalPoints() {
2828
assertTrue(UtilShimmer.round(-5.444, 2) == -5.44);
2929
}
3030

31+
@Test
32+
public void testConvertLongToHexString() {
33+
assertEquals("0000000000000000", UtilShimmer.convertLongToHexString(0L));
34+
assertEquals("0000000000000001", UtilShimmer.convertLongToHexString(1L));
35+
assertEquals("00000000ffffffff".toUpperCase(), UtilShimmer.convertLongToHexString(4294967295L)); // max unsigned int
36+
assertEquals("7fffffffffffffff".toUpperCase(), UtilShimmer.convertLongToHexString(Long.MAX_VALUE));
37+
assertEquals("8000000000000000", UtilShimmer.convertLongToHexString(Long.MIN_VALUE));
38+
assertEquals("00000000075bcd15".toUpperCase(), UtilShimmer.convertLongToHexString(123456789L));
39+
}
40+
41+
3142
@Test
3243
public void testRoundNegativeDecimalPoints() {
3344
try {

ShimmerDriverPC/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ publishing {
3737

3838
groupId = 'com.shimmerresearch' // Replace with your package's group/organization name
3939
artifactId = 'shimmerdriverpc' // Replace with the name of your package
40-
version = '0.11.2_beta' // Replace with your package version
40+
version = '0.11.3_beta' // Replace with your package version
4141

4242
// Jar publication
4343
//(

0 commit comments

Comments
 (0)