Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
init upload before subscribing
  • Loading branch information
Alberto Iannaccone committed Jul 12, 2018
commit a2e4f576ffd74eee9ab8a0a5ff9e371b9d050dac
2 changes: 1 addition & 1 deletion src/boardConfiguration.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ export default class BoardConfiguration {
* @param {function} createDeviceCb used to create the device associated to the user
*/
configure(compiledSketch, board, createDeviceCb) {
this.daemon.initUpload();
this.configuring.next({ status: this.CONFIGURE_IN_PROGRESS, msg: 'Uploading provisioning sketch...' });
if (!this.daemon.channelOpen.getValue()) {
const errorMessage = `Couldn't configure board at port ${board.port} because we there is no open channel to the Arduino Create Plugin.`;
Expand Down Expand Up @@ -236,7 +237,6 @@ export default class BoardConfiguration {
this.configuring.next({ status: this.CONFIGURE_ERROR, err: `Couldn't configure board at port ${board.port}. Upload failed with error: ${upload.err}` });
});

this.daemon.initUpload();
this.uploadSketch(compiledSketch, board);
}
}