|
8 | 8 | import java.util.List;
|
9 | 9 |
|
10 | 10 | import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
11 |
| -import org.eclipse.core.resources.IProject; |
| 11 | +import io.sloeber.core.api.SloeberProject; |
12 | 12 | import org.eclipse.core.runtime.IStatus;
|
13 | 13 | import org.eclipse.core.runtime.Status;
|
14 | 14 | import org.eclipse.ui.console.MessageConsoleStream;
|
15 | 15 |
|
16 | 16 | import io.sloeber.core.api.BoardDescription;
|
17 | 17 | import io.sloeber.core.api.Serial;
|
18 | 18 |
|
| 19 | + |
19 | 20 | public class ArduinoSerial {
|
20 | 21 |
|
21 | 22 | private ArduinoSerial() {
|
@@ -103,8 +104,7 @@ private static String wait_for_com_Port_to_appear(MessageConsoleStream console,
|
103 | 104 | int newPortsCopySize = newPorts.size();
|
104 | 105 | if ((newPortsCopy.isEmpty()) && (newPortsCopySize == prefNewPortsCopySize + 1)) {
|
105 | 106 | console.println(ArduinoSerial_Comport_Appeared_and_disappeared);
|
106 |
| - console.println( |
107 |
| - ArduinoSerial_Comport_reset_took.replace(MS_TAG, Integer.toString(numTries * delayMs))); |
| 107 | + console.println(ArduinoSerial_Comport_reset_took.replace(MS_TAG, Integer.toString(numTries * delayMs))); |
108 | 108 | return defaultComPort;
|
109 | 109 | }
|
110 | 110 | prefNewPortsCopySize = newPortsCopySize;
|
@@ -144,8 +144,10 @@ private static String wait_for_com_Port_to_appear(MessageConsoleStream console,
|
144 | 144 | * The name of the com port to reset
|
145 | 145 | * @return The com port to upload to
|
146 | 146 | */
|
147 |
| - public static String makeArduinoUploadready(MessageConsoleStream console, IProject project, |
148 |
| - ICConfigurationDescription confDesc, BoardDescription boardDescriptor) { |
| 147 | + public static String makeArduinoUploadready(MessageConsoleStream console, SloeberProject project, |
| 148 | + ICConfigurationDescription confDesc) { |
| 149 | + |
| 150 | + BoardDescription boardDescriptor = project.getBoardDescription(confDesc.getName(), true); |
149 | 151 | boolean use_1200bps_touch = getBuildEnvironmentVariable(confDesc, ENV_KEY_UPLOAD_USE_1200BPS_TOUCH, FALSE)
|
150 | 152 | .equalsIgnoreCase(TRUE);
|
151 | 153 | boolean bWaitForUploadPort = getBuildEnvironmentVariable(confDesc, ENV_KEY_WAIT_FOR_UPLOAD_PORT, FALSE)
|
|
0 commit comments