Skip to content
This repository has been archived by the owner on Feb 21, 2020. It is now read-only.

Commit

Permalink
Update uploader.js
Browse files Browse the repository at this point in the history
Adding control in mode switching
  • Loading branch information
sebba authored and sergiotomasello committed Nov 18, 2015
1 parent b050e30 commit 8410103
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions node/compiler/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,10 @@ exports.upload = function(upcmd,options, publish, callback) {
console.log("doing a second list");
//scan for ports again
scanForPortReturn(list1, options, function(ppath) {
//TODO : in upcmd search "-P"+options.port and substitute with "-P"+ppath
upcmd[upcmd.indexOf("-P"+options.port)] = "-P"+ppath;
//options.port = ppath;
if(upcmd.indexOf("-P"+options.port)>-1)
upcmd[upcmd.indexOf("-P"+options.port)] = "-P"+ppath;
if(upcmd.indexOf("--port="+options.port)>-1)
upcmd[upcmd.indexOf("--port="+options.port)] = "--port="+ppath;
runAVRDude(upcmd, debug, callback);
})
},3000);
Expand Down Expand Up @@ -226,4 +227,4 @@ exports.writeBootloader = function(port, options){
}
}
);
}
}

0 comments on commit 8410103

Please sign in to comment.