mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-28 04:28:32 +00:00
Fix upload and serial (#661)
* get serial connection status from BE * handle serial connect in the BE * allow breakpoints on vscode (windows) * Timeout on config change to prevent serial busy * serial-service tests
This commit is contained in:
@@ -18,15 +18,22 @@ export namespace Status {
|
||||
export const ALREADY_CONNECTED: ErrorStatus = {
|
||||
message: 'Already connected.',
|
||||
};
|
||||
export const CONFIG_MISSING: ErrorStatus = {
|
||||
message: 'Serial Config missing.',
|
||||
};
|
||||
}
|
||||
|
||||
export const SerialServicePath = '/services/serial';
|
||||
export const SerialService = Symbol('SerialService');
|
||||
export interface SerialService extends JsonRpcServer<SerialServiceClient> {
|
||||
connect(config: SerialConfig): Promise<Status>;
|
||||
disconnect(): Promise<Status>;
|
||||
clientsAttached(): Promise<number>;
|
||||
setSerialConfig(config: SerialConfig): Promise<void>;
|
||||
sendMessageToSerial(message: string): Promise<Status>;
|
||||
updateWsConfigParam(config: Partial<SerialPlotter.Config>): Promise<void>;
|
||||
isSerialPortOpen(): Promise<boolean>;
|
||||
connectSerialIfRequired(): Promise<void>;
|
||||
disconnect(reason?: SerialError): Promise<Status>;
|
||||
uploadInProgress: boolean;
|
||||
}
|
||||
|
||||
export interface SerialConfig {
|
||||
|
||||
Reference in New Issue
Block a user