Handles calling the export() function on sketch, and queues all the gui status stuff that comes along with it. Made synchronized to (hopefully) avoid problems of people hitting export twice, quickly, and horking things up.
(final boolean usingProgrammer)
| 2024 | * hitting export twice, quickly, and horking things up. |
| 2025 | */ |
| 2026 | synchronized public void handleExport(final boolean usingProgrammer) { |
| 2027 | if (PreferencesData.getBoolean("editor.save_on_verify")) { |
| 2028 | if (sketch.isModified() && !sketchController.isReadOnly()) { |
| 2029 | handleSave(true); |
| 2030 | } |
| 2031 | } |
| 2032 | toolbar.activateExport(); |
| 2033 | console.clear(); |
| 2034 | status.progress(tr("Uploading to I/O Board...")); |
| 2035 | |
| 2036 | avoidMultipleOperations = true; |
| 2037 | |
| 2038 | new Thread(timeoutUploadHandler).start(); |
| 2039 | new Thread(usingProgrammer ? uploadUsingProgrammerHandler : uploadHandler).start(); |
| 2040 | } |
| 2041 | |
| 2042 | class UploadHandler implements Runnable { |
| 2043 | boolean usingProgrammer = false; |
no test coverage detected