Fix upload and serial (#661)

* get serial connection status from BE

* handle serial connect in the BE

* allow breakpoints on vscode (windows)

* Timeout on config change to prevent serial busy

* serial-service tests
This commit is contained in:
Francesco Stasi
2021-12-07 17:38:43 +01:00
committed by GitHub
parent 88397931c5
commit 767b09d2f1
19 changed files with 576 additions and 756 deletions

View File

@@ -48,7 +48,6 @@ export class BurnBootloader extends SketchContribution {
}
async burnBootloader(): Promise<void> {
await this.serialConnection.disconnect();
try {
const { boardsConfig } = this.boardsServiceClientImpl;
const port = boardsConfig.selectedPort;
@@ -87,9 +86,7 @@ export class BurnBootloader extends SketchContribution {
}
this.messageService.error(errorMessage);
} finally {
if (this.serialConnection.isSerialOpen()) {
await this.serialConnection.connect();
}
await this.serialConnection.reconnectAfterUpload();
}
}
}