Skip to content

Commit 19644cd

Browse files
author
jantje
committed
Split teensy get boerds.txt and get platform
Get platform is needed to install Get boards is needed to create a boardid
1 parent aaafc15 commit 19644cd

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,23 @@
1515

1616
@SuppressWarnings("nls")
1717
public class Shared {
18-
public static String teensyInstall = "D:/arduino/arduino-1.6.9 - Teensy 1.29/hardware";
19-
public static String teensyBoards_txt = teensyInstall + "/teensy/avr/boards.txt";
18+
private static String teensyInstall = "D:/arduino/arduino-1.6.9 - Teensy 1.29/hardware/teensy";
19+
private static String teensyInstallLinux = "/home/jantje/programs/arduino-1.8.0/hardware/teensy";
20+
21+
public static String getTeensyPlatform(){
22+
switch (Platform.getOS()){
23+
case Platform.OS_WIN32:
24+
return teensyInstall;
25+
case Platform.OS_LINUX:
26+
return teensyInstallLinux ;
27+
}
28+
return null;
29+
}
30+
31+
32+
public static String getTeensyBoard_txt(){
33+
return getTeensyPlatform() + "/avr/boards.txt";
34+
}
2035

2136
public static boolean hasBuildErrors(IProject project) throws CoreException {
2237
IMarker[] markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);

0 commit comments

Comments
 (0)