Skip to content

Commit 00de144

Browse files
author
jantje
committed
export the systemspecific stuff to a class
1 parent 3da109b commit 00de144

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package io.sloeber.core;
2+
3+
import io.sloeber.core.api.Other;
4+
5+
/*
6+
* Set system specific info here.
7+
* For now this is only the teensy installlocation
8+
*/
9+
@SuppressWarnings("nls")
10+
public class MySystem {
11+
private static String jantjesWindowsMachine = "D:\\arduino\\arduino-1.8.2Teensy1.38beta2\\hardware\\teensy";
12+
private static String jantjesVirtualLinuxMachine = "/home/jantje/programs/arduino-1.8.0/hardware/teensy";
13+
14+
public static String getTeensyPlatform() {
15+
switch (Other.getSystemHash()) {
16+
case "1248215851":
17+
return jantjesWindowsMachine;
18+
case "still need to gett the key":
19+
return jantjesVirtualLinuxMachine;
20+
}
21+
return new String();
22+
}
23+
}

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

+1-10
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,17 @@
2626
import io.sloeber.core.api.CodeDescriptor;
2727
import io.sloeber.core.api.CompileOptions;
2828
import io.sloeber.core.api.ConfigurationDescriptor;
29-
import io.sloeber.core.api.Other;
3029

3130
@SuppressWarnings("nls")
3231
public class Shared {
3332
public final static String TEST_LIBRARY_INDEX_URL = "https://raw.githubusercontent.com/Sloeber/arduino-eclipse-plugin/master/io.sloeber.core/src/jUnit/library_sloeber_index.json";
3433
public final static String ADAFRUIT_BOARDS_URL = "https://adafruit.github.io/arduino-board-index/package_adafruit_index.json";
3534
public final static String ESP8266_BOARDS_URL = "http://arduino.esp8266.com/stable/package_esp8266com_index.json";
3635

37-
private static String jantjesWindowsMachine = "D:\\arduino\\arduino-1.8.2Teensy1.38beta2\\hardware\\teensy";
38-
private static String jantjesVirtualLinuxMachine = "/home/jantje/programs/arduino-1.8.0/hardware/teensy";
3936
private static int mCounter = 0;
4037

4138
public static String getTeensyPlatform() {
42-
switch (Other.getSystemHash()) {
43-
case "1248215851":
44-
return jantjesWindowsMachine;
45-
case "still need to gett the key":
46-
return jantjesVirtualLinuxMachine;
47-
}
48-
return new String();
39+
return MySystem.getTeensyPlatform();
4940
}
5041

5142
public static String getTeensyBoard_txt() {

0 commit comments

Comments
 (0)