mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-26 19:48:35 +00:00
Add dialog to insert user fields for board that require them to upload (#550)
* Rebuild gRPC protocol interfaces * Implement methods to get user fields for board/port combination * Implement dialog to input board user fields * Add configure and upload step when uploading to board requiring user fields * Disable Sketch > Configure and Upload menu if board doesn't support user fields * Fix serial upload not working with all boards * Update i18n source file * fix user fields UI * regenerate cli protocol * fix localisation * check if user fields are empty Co-authored-by: Alberto Iannaccone <a.iannaccone@arduino.cc>
This commit is contained in:
@@ -143,6 +143,7 @@ export interface BoardsService
|
||||
fqbn: string;
|
||||
}): Promise<BoardsPackage | undefined>;
|
||||
searchBoards({ query }: { query?: string }): Promise<BoardWithPackage[]>;
|
||||
getBoardUserFields(options: { fqbn: string, protocol: string }): Promise<BoardUserField[]>;
|
||||
}
|
||||
|
||||
export interface Port {
|
||||
@@ -251,6 +252,14 @@ export interface Board {
|
||||
readonly port?: Port;
|
||||
}
|
||||
|
||||
export interface BoardUserField {
|
||||
readonly toolId: string;
|
||||
readonly name: string;
|
||||
readonly label: string;
|
||||
readonly secret: boolean;
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface BoardWithPackage extends Board {
|
||||
readonly packageName: string;
|
||||
readonly packageId: string;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { BoardUserField } from '.';
|
||||
import { Port } from '../../common/protocol/boards-service';
|
||||
import { Programmer } from './boards-service';
|
||||
|
||||
@@ -44,6 +45,7 @@ export namespace CoreService {
|
||||
readonly port?: Port | undefined;
|
||||
readonly programmer?: Programmer | undefined;
|
||||
readonly verify: boolean;
|
||||
readonly userFields: BoardUserField[];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user