ATL-814: Show boards and ports under Tools menu.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2021-01-21 16:14:00 +01:00
committed by Akos Kitta
parent f6b5dd24e2
commit c6b125011e
7 changed files with 234 additions and 21 deletions

View File

@@ -1,5 +1,6 @@
import { injectable, inject, named } from 'inversify';
import { ILogger } from '@theia/core/lib/common/logger';
import { notEmpty } from '@theia/core/lib/common/objects';
import {
BoardsService,
Installable,
@@ -128,12 +129,22 @@ export class BoardsServiceImpl implements BoardsService {
platform: p.getPlatform()
});
let VID = 'N/A';
let PID = 'N/A';
const usbId = detailsResp.getIdentificationPrefList().map(item => item.getUsbid()).find(notEmpty);
if (usbId) {
VID = usbId.getVid();
PID = usbId.getPid();
}
return {
fqbn,
requiredTools,
configOptions,
programmers,
debuggingSupported
debuggingSupported,
VID,
PID
};
}