Skip to content

Commit c752bf4

Browse files
authored
Merge pull request #258 from ShimmerEngineering/DEV-521_MA
DEV-521
2 parents 7b14e44 + 680ea62 commit c752bf4

2 files changed

Lines changed: 41 additions & 2 deletions

File tree

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,27 @@ public static final class MASS_STORAGE_DEVICE {
148148
public static final String[] SHIMMER_3R = new String[] {
149149
"VID_0483&PID_52A4",
150150
};
151+
152+
public static final String[] SHIMMER_3R_USB_DFU = new String[] {
153+
"VID_0483&PID_DF11",
154+
};
155+
151156

152157
public static final String[] SHIMMER = new String[] {
153158
"shimmer",
154159
};
160+
161+
public static final String[] VERISENSE_USB = new String[] {
162+
"VID_1915&PID_520F",
163+
};
164+
165+
public static final String[] VERISENSE = new String[] {
166+
"verisense",
167+
};
155168

156-
public static final String[] SHIMMER3R_COMPOSITE_DEVICE = new String[] { "SHIMMER COMPOSITE DEVICE" };
169+
public static final String[] SHIMMER3R_COMPOSITE_DEVICE = new String[] { "SHIMMER COMPOSITE DEVICE","STM32 COMPOSITE DEVICE"};
157170

158-
public static final String[] SHIMMER3R_MSC_DEVICE = new String[] { "SHIMMER MSC DEVICE" };
171+
public static final String[] SHIMMER3R_MSC_DEVICE = new String[] { "SHIMMER MSC","STM32 MSC DEVICE" };
159172

160173
public static final class SERVICE_DESCRIPTION {
161174
public static final String[] COMPOSITE_DEVICE = new String[]{"USB Composite Device"};

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,32 @@ public static boolean stringContainsItemFromList(String inputString, String[] it
801801
}
802802
return false;
803803
}
804+
805+
public static boolean stringContainsOnlyWordsItemFromList(String inputString, String[] items) {
806+
807+
boolean allMatched = true;
808+
String target = inputString.toUpperCase();
809+
810+
for (String item : items) {
811+
812+
String[] words = item.toUpperCase().split("\\s+");
813+
814+
System.out.println("target : " + target);
815+
for (String w : words) {
816+
System.out.println("words = " + w);
817+
818+
if (!target.contains(w)) {
819+
allMatched = false;
820+
}
821+
}
822+
823+
if(allMatched) {
824+
return true;
825+
}
826+
}
827+
828+
return false;
829+
}
804830

805831
public void threadSleep(long millis) {
806832
millisecondDelay(millis);

0 commit comments

Comments
 (0)