diff --git a/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js b/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js index 2b58558c..950e051b 100644 --- a/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js +++ b/mixly/common/modules/mixly-modules/web-socket/arduino-shell.js @@ -51,6 +51,12 @@ goog.loadJs('web', () => { this.shell = new WebSocketArduShell(); const socket = this.socket; + // 同时初始化 WebCompiler.ArduShell,用于本地上传 + const WebCompilerArduShell = getWebCompilerArduShell(); + if (WebCompilerArduShell && !WebCompilerArduShell.getMixlySocket()) { + WebCompilerArduShell.init(mixlySocket); + } + socket.on('arduino.dataEvent', (data) => { if (data.length > 1000) { return;