Skip to content

Commit 3f8aa88

Browse files
author
jantje
committed
Added esplora board
This makes 430 projects to build on my system
1 parent aaafc15 commit 3f8aa88

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

io.sloeber.core/src/jUnit/CreateAndCompileExamples.java

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public static Collection examples() {
6565
fail("uno Board not found");
6666
return null;
6767
}
68+
BoardDescriptor EsploraBoardid = BoardsManager.getBoardID("package_index.json", "arduino", "Arduino AVR Boards",
69+
"esplora", myOptions);
70+
if (EsploraBoardid == null) {
71+
fail("Esplora Board not found");
72+
return null;
73+
}
6874

6975
LinkedList<Object[]> examples = new LinkedList<>();
7076
TreeMap<String, IPath> exampleFolders = BoardsManager.getAllExamples(null);
@@ -81,6 +87,11 @@ public static Collection examples() {
8187
if (isExampleOkForUno(curexample.getKey())) {
8288
Object[] theData = new Object[] { "Uno :" + curexample.getKey(), unoBoardid, codeDescriptor };
8389

90+
examples.add(theData);
91+
}
92+
if (isExampleOkForEsplora(curexample.getKey())) {
93+
Object[] theData = new Object[] { "Esplora :" + curexample.getKey(), EsploraBoardid, codeDescriptor };
94+
8495
examples.add(theData);
8596
}
8697
}
@@ -97,7 +108,7 @@ private static boolean isExampleOkForUno(String key) {
97108
"examples-09.USB-Mouse-JoystickMouseControl", };
98109
if (key.startsWith("Esploraexamples"))
99110
return false;
100-
if (key.startsWith("TFTexamples-Esplora-EsploraTFTTemp"))
111+
if (key.startsWith("TFTexamples-Esplora-Esplora"))
101112
return false;
102113

103114
if (key.contains("Firmata"))
@@ -113,13 +124,24 @@ private static boolean isExampleOkForLeonardo(String key) {
113124
"Firmataexamples-StandardFirmataWiFi" };
114125
if (key.contains("Firmata"))
115126
return false;
116-
if (key.startsWith("TFTexamples-Esplora-EsploraTFTTemp"))
127+
if (key.startsWith("TFTexamples-Esplora-Esplora"))
117128
return false;
118129
if (Arrays.asList(notOkForLeonardo).contains(key))
119130
return false;
120131
return true; // default everything is fine
121132
}
122133

134+
private static boolean isExampleOkForEsplora(String key) {
135+
final String[] notOkForEsplora = { "Firmataexamples-StandardFirmataBLE",
136+
"Firmataexamples-StandardFirmataChipKIT", "Firmataexamples-StandardFirmataEthernet",
137+
"Firmataexamples-StandardFirmataWiFi" };
138+
if (key.startsWith("TFTexamples-Esplora-Esplora"))
139+
return false;
140+
if (Arrays.asList(notOkForEsplora).contains(key))
141+
return false;
142+
return true; // default everything is fine
143+
}
144+
123145
/*
124146
* In new new installations (of the Sloeber development environment) the
125147
* installer job will trigger downloads These mmust have finished before we

0 commit comments

Comments
 (0)