mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-06 17:08:32 +00:00
Can list HW, build for it and upload
This commit is contained in:
@@ -10,7 +10,9 @@ export class BoardsServiceImpl implements BoardsService {
|
||||
@inject(CoreClientProvider)
|
||||
protected readonly coreClientProvider: CoreClientProvider;
|
||||
|
||||
public async attachedBoards(): Promise<{ boards: AttachedBoard[] }> {
|
||||
protected selectedBoard: AttachedBoard | undefined;
|
||||
|
||||
public async getAttachedBoards(): Promise<{ boards: AttachedBoard[] }> {
|
||||
const { client, instance } = await this.coreClientProvider.getClient();
|
||||
|
||||
const req = new BoardListReq();
|
||||
@@ -36,6 +38,14 @@ export class BoardsServiceImpl implements BoardsService {
|
||||
return { boards: serialBoards.concat(networkBoards) };
|
||||
}
|
||||
|
||||
async selectBoard(board: AttachedBoard): Promise<void> {
|
||||
this.selectedBoard = board;
|
||||
}
|
||||
|
||||
async getSelectBoard(): Promise<AttachedBoard | undefined> {
|
||||
return this.selectedBoard;
|
||||
}
|
||||
|
||||
async search(options: { query?: string }): Promise<{ items: Board[] }> {
|
||||
const { client, instance } = await this.coreClientProvider.getClient();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user