mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-21 15:54:39 +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
|
// Cycle through all boards of this platform
|
||||||
for (TargetBoard board : targetPlatform.getBoards().values()) {
|
for (TargetBoard board : targetPlatform.getBoards().values()) {
|
||||||
|
if (board.getPreferences().get("hide") != null)
|
||||||
|
continue;
|
||||||
JMenuItem item = createBoardMenusAndCustomMenus(boardsCustomMenus, menuItemsToClickAfterStartup,
|
JMenuItem item = createBoardMenusAndCustomMenus(boardsCustomMenus, menuItemsToClickAfterStartup,
|
||||||
buttonGroupsMap,
|
buttonGroupsMap,
|
||||||
board, targetPlatform, targetPackage);
|
board, targetPlatform, targetPackage);
|
||||||
|
@ -236,14 +236,29 @@ public class Platform {
|
|||||||
List<String> vids = new LinkedList<>(board.getPreferences().subTree("vid", 1).values());
|
List<String> vids = new LinkedList<>(board.getPreferences().subTree("vid", 1).values());
|
||||||
if (!vids.isEmpty()) {
|
if (!vids.isEmpty()) {
|
||||||
List<String> pids = new LinkedList<>(board.getPreferences().subTree("pid", 1).values());
|
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++) {
|
for (int i = 0; i < vids.size(); i++) {
|
||||||
String vidPid = vids.get(i) + "_" + pids.get(i);
|
String vidPid = vids.get(i) + "_" + pids.get(i);
|
||||||
if (vid_pid_iSerial.toUpperCase().contains(vidPid.toUpperCase())) {
|
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<>();
|
Map<String, Object> boardData = new HashMap<>();
|
||||||
boardData.put("board", board);
|
boardData.put("board", board);
|
||||||
boardData.put("vid", vids.get(i));
|
boardData.put("vid", vids.get(i));
|
||||||
boardData.put("pid", pids.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;
|
return boardData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
<property name="portable" value="false" />
|
<property name="portable" value="false" />
|
||||||
|
|
||||||
<property name="ARDUINO-BUILDER-VERSION" value="1.3.23" />
|
<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="AVRGCC-VERSION" value="4.9.2-atmel3.5.3-arduino2" />
|
||||||
<property name="AVRDUDE-VERSION" value="6.3.0-arduino6" />
|
<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