|
23 | 23 |
|
24 | 24 | package processing.app;
|
25 | 25 |
|
26 |
| -import cc.arduino.packages.BoardPort; |
27 | 26 | import cc.arduino.packages.Uploader;
|
28 |
| -import cc.arduino.view.*; |
29 | 27 | import processing.app.debug.Compiler;
|
30 | 28 | import processing.app.debug.Compiler.ProgressListener;
|
31 | 29 | import processing.app.debug.RunnerException;
|
32 |
| -import processing.app.debug.TargetBoard; |
33 | 30 | import processing.app.forms.PasswordAuthorizationDialog;
|
34 | 31 | import processing.app.helpers.OSUtils;
|
35 |
| -import processing.app.helpers.PreferencesMap; |
36 | 32 | import processing.app.helpers.PreferencesMapException;
|
37 | 33 | import processing.app.packages.UserLibrary;
|
38 | 34 | import static processing.app.I18n._;
|
|
46 | 42 | import java.util.LinkedList;
|
47 | 43 | import java.util.List;
|
48 | 44 |
|
49 |
| -import static processing.app.I18n._; |
50 |
| - |
51 | 45 |
|
52 | 46 | /**
|
53 | 47 | * Stores information about files in the current sketch
|
@@ -1153,8 +1147,6 @@ public String build(boolean verbose) throws RunnerException, PreferencesMapExcep
|
1153 | 1147 | * @return null if compilation failed, main class name if not
|
1154 | 1148 | */
|
1155 | 1149 | public String build(String buildPath, boolean verbose) throws RunnerException, PreferencesMapException {
|
1156 |
| - useOriginalVidPidIfUncertified(); |
1157 |
| - |
1158 | 1150 | // run the preprocessor
|
1159 | 1151 | editor.status.progressUpdate(20);
|
1160 | 1152 |
|
@@ -1204,38 +1196,6 @@ public boolean exportApplet(String appletPath, boolean usingProgrammer)
|
1204 | 1196 | return success;
|
1205 | 1197 | }
|
1206 | 1198 |
|
1207 |
| - private void useOriginalVidPidIfUncertified() { |
1208 |
| - BoardPort boardPort = BaseNoGui.getDiscoveryManager().find(PreferencesData.get("serial.port")); |
1209 |
| - if (boardPort == null) { |
1210 |
| - return; |
1211 |
| - } |
1212 |
| - TargetBoard targetBoard = BaseNoGui.getTargetBoard(); |
1213 |
| - if (targetBoard == null) { |
1214 |
| - return; |
1215 |
| - } |
1216 |
| - PreferencesMap boardPreferences = targetBoard.getPreferences(); |
1217 |
| - if (boardPreferences.containsKey("build.vid") && boardPreferences.containsKey("build.pid")) { |
1218 |
| - if (!boardPreferences.containsKey("backup.build.vid")) { |
1219 |
| - boardPreferences.put("backup.build.vid", boardPreferences.get("build.vid")); |
1220 |
| - boardPreferences.put("backup.build.pid", boardPreferences.get("build.pid")); |
1221 |
| - } |
1222 |
| - |
1223 |
| - if (boardPort.getPrefs().get("warning") != null) { |
1224 |
| - boardPreferences.put("build.vid", boardPort.getPrefs().get("vid")); |
1225 |
| - boardPreferences.put("build.pid", boardPort.getPrefs().get("pid")); |
1226 |
| - } else { |
1227 |
| - boardPreferences.put("build.vid", boardPreferences.get("backup.build.vid")); |
1228 |
| - boardPreferences.put("build.pid", boardPreferences.get("backup.build.pid")); |
1229 |
| - } |
1230 |
| - } |
1231 |
| - |
1232 |
| - if (boardPort.getPrefs().get("warning") != null && !Preferences.getBoolean("uncertifiedBoardWarning_dontShowMeAgain")) { |
1233 |
| - SwingUtilities.invokeLater(new ShowUncertifiedBoardWarning(editor)); |
1234 |
| - } |
1235 |
| - |
1236 |
| - |
1237 |
| - } |
1238 |
| - |
1239 | 1199 | protected boolean upload(String buildPath, String suggestedClassName, boolean usingProgrammer) throws Exception {
|
1240 | 1200 |
|
1241 | 1201 | Uploader uploader = Compiler.getUploaderByPreferences(false);
|
|
0 commit comments