@@ -157,21 +157,27 @@ public UploadJobWrapper(String name, IProject project, String cConf, IRealUpload
157
157
@ Override
158
158
protected IStatus run (IProgressMonitor monitor ) {
159
159
boolean WeStoppedTheComPort = false ;
160
- String myComPort = Const .EMPTY_STRING ;
160
+ String comPort = Const .EMPTY_STRING ;
161
161
try {
162
- monitor .beginTask (Messages .Upload_uploading + " \" " + this .myProject .getName () + "\" " + this .myNAmeTag , //$NON-NLS-1$//$NON-NLS-2$
163
- 2 );
164
- myComPort = Common .getBuildEnvironmentVariable (this .myProject , this .myCConf ,
165
- Const .ENV_KEY_JANTJE_COM_PORT , "" ); //$NON-NLS-1$
162
+ String message = Messages .Upload_uploading ;
163
+ message += " \" " + this .myProject .getName () + "\" " ; //$NON-NLS-1$//$NON-NLS-2$
164
+ message += this .myNAmeTag + Const .SPACE ;
165
+ // message+= this.+Const.SPACE;
166
+ monitor .beginTask (message , 2 );
167
+ comPort = Common .getBuildEnvironmentVariable (this .myProject , this .myCConf ,
168
+ Const .ENV_KEY_JANTJE_COM_PORT , Const .EMPTY_STRING );
169
+ String programmer = Common .getBuildEnvironmentVariable (this .myProject , this .myCConf ,
170
+ Const .get_Jantje_KEY_PROTOCOL (Const .ACTION_UPLOAD ), Const .DEFAULT );
166
171
167
172
try {
168
- WeStoppedTheComPort = Common .StopSerialMonitor (myComPort );
173
+ WeStoppedTheComPort = Common .StopSerialMonitor (comPort );
169
174
} catch (Exception e ) {
170
175
Common .log (new Status (IStatus .WARNING , Const .CORE_PLUGIN_ID , Messages .Upload_Error_com_port , e ));
171
176
}
172
177
IFile hexFile = this .myProject
173
178
.getFile (new Path (this .myCConf ).append (this .myProject .getName () + ".hex" )); //$NON-NLS-1$
174
- if (this .myUploader .uploadUsingPreferences (hexFile , false , monitor )) {
179
+ if (this .myUploader .uploadUsingPreferences (hexFile , !programmer .equalsIgnoreCase (Const .DEFAULT ),
180
+ monitor )) {
175
181
UploadSketchWrapper .this .myHighLevelConsoleStream .println (Messages .Upload_Done );
176
182
} else {
177
183
UploadSketchWrapper .this .myHighLevelConsoleStream .println (Messages .Upload_failed_upload );
@@ -182,7 +188,7 @@ protected IStatus run(IProgressMonitor monitor) {
182
188
} finally {
183
189
try {
184
190
if (WeStoppedTheComPort ) {
185
- Common .StartSerialMonitor (myComPort );
191
+ Common .StartSerialMonitor (comPort );
186
192
}
187
193
} catch (Exception e ) {
188
194
Common .log (new Status (IStatus .WARNING , Const .CORE_PLUGIN_ID ,
0 commit comments