mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Add extra field to serial discovery targeting Tian board
This commit is contained in:
parent
3c836f4fee
commit
e9709689de
@ -1444,6 +1444,8 @@ public class Base {
|
||||
|
||||
// Cycle through all boards of this platform
|
||||
for (TargetBoard board : targetPlatform.getBoards().values()) {
|
||||
if (board.getPreferences().get("hide") != null)
|
||||
continue;
|
||||
JMenuItem item = createBoardMenusAndCustomMenus(boardsCustomMenus, menuItemsToClickAfterStartup,
|
||||
buttonGroupsMap,
|
||||
board, targetPlatform, targetPackage);
|
||||
|
@ -236,14 +236,29 @@ public class Platform {
|
||||
List<String> vids = new LinkedList<>(board.getPreferences().subTree("vid", 1).values());
|
||||
if (!vids.isEmpty()) {
|
||||
List<String> pids = new LinkedList<>(board.getPreferences().subTree("pid", 1).values());
|
||||
List<String> descriptors = new LinkedList<>(board.getPreferences().subTree("descriptor", 1).values());
|
||||
for (int i = 0; i < vids.size(); i++) {
|
||||
String vidPid = vids.get(i) + "_" + pids.get(i);
|
||||
if (vid_pid_iSerial.toUpperCase().contains(vidPid.toUpperCase())) {
|
||||
if (!descriptors.isEmpty()) {
|
||||
boolean matched = false;
|
||||
for (int j = 0; j < descriptors.size(); j++) {
|
||||
if (vid_pid_iSerial.toUpperCase().contains(descriptors.get(j).toUpperCase())) {
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (matched == false) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, Object> boardData = new HashMap<>();
|
||||
boardData.put("board", board);
|
||||
boardData.put("vid", vids.get(i));
|
||||
boardData.put("pid", pids.get(i));
|
||||
boardData.put("iserial", vid_pid_iSerial.substring(vidPid.length()+1));
|
||||
String extrafields = vid_pid_iSerial.substring(vidPid.length()+1);
|
||||
String[] parts = extrafields.split("_");
|
||||
boardData.put("iserial", parts[0]);
|
||||
return boardData;
|
||||
}
|
||||
}
|
||||
|
@ -86,7 +86,7 @@
|
||||
<property name="portable" value="false" />
|
||||
|
||||
<property name="ARDUINO-BUILDER-VERSION" value="1.3.23" />
|
||||
<property name="LIBLISTSERIAL-VERSION" value="1.2.0" />
|
||||
<property name="LIBLISTSERIAL-VERSION" value="1.4.0" />
|
||||
<property name="AVRGCC-VERSION" value="4.9.2-atmel3.5.3-arduino2" />
|
||||
<property name="AVRDUDE-VERSION" value="6.3.0-arduino6" />
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
962a7cf3e2007d47fc990a667221c3c45326c23c
|
1
build/liblistSerials-1.4.0.zip.sha
Normal file
1
build/liblistSerials-1.4.0.zip.sha
Normal file
@ -0,0 +1 @@
|
||||
abec9fe7b7dfb5ae5bf5eb0bd883ef9f6ad7a7eb
|
Loading…
x
Reference in New Issue
Block a user