Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix monitor service id creation
  • Loading branch information
Alberto Iannaccone committed Jun 8, 2022
commit 7809d1bf523ae4043e716930ac741da665529e99
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ArduinoFirmwareUploaderImpl implements ArduinoFirmwareUploader {
fqbn: firmware.board_fqbn,
};
try {
this.monitorManager.notifyUploadStarted(board, port);
await this.monitorManager.notifyUploadStarted(board, port);
output = await this.runCommand([
'firmware',
'flash',
Expand Down
4 changes: 3 additions & 1 deletion arduino-ide-extension/src/node/monitor-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ export class MonitorManager extends CoreClientAware {
* @returns a unique monitor ID
*/
private monitorID(board: Board, port: Port): MonitorID {
return `${board.fqbn}-${port.address}-${port.protocol}`;
const splitFqbn = board?.fqbn?.split(':') || [];
const shortenedFqbn = splitFqbn.slice(0, 3).join(':') || '';
return `${shortenedFqbn}-${port.address}-${port.protocol}`;
}
}