Skip to content

Commit a9498bb

Browse files
committed
ATL-837: board serial number
ATL-837 ATL-837 ATLboard serial number
1 parent cdd5cfd commit a9498bb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

arduino-ide-extension/src/browser/contributions/board-selection.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export class BoardSelection extends SketchContribution {
5656
const { VID, PID } = boardDetails;
5757
const detail = `BN: ${selectedBoard.name}
5858
VID: ${VID}
59-
PID: ${PID}`;
59+
PID: ${PID}
60+
S/N: ${selectedBoard.serialNumber}`;
6061
await remote.dialog.showMessageBox(remote.getCurrentWindow(), {
6162
message: 'Board Info',
6263
title: 'Board Info',

arduino-ide-extension/src/common/protocol/boards-service.ts

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ export interface Board {
270270
readonly name: string;
271271
readonly fqbn?: string;
272272
readonly port?: Port;
273+
readonly serialNumber?: string;
273274
}
274275

275276
export interface BoardWithPackage extends Board {

arduino-ide-extension/src/node/board-discovery.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ export class BoardDiscovery {
7474
// const label = detectedPort.getProtocolLabel();
7575
const port = { address, protocol };
7676
const boards: Board[] = [];
77+
const serialNumber = detectedPort.getSerialNumber();
78+
7779
for (const item of detectedPort.getBoardsList()) {
78-
boards.push({ fqbn: item.getFqbn(), name: item.getName() || 'unknown', port });
80+
boards.push({ fqbn: item.getFqbn(), name: item.getName() || 'unknown', port, serialNumber });
7981
}
8082

8183
if (eventType === 'add') {

0 commit comments

Comments
 (0)