fix(websocket-arduino): 在 init 中同时初始化 WebCompiler.ArduShell

This commit is contained in:
yczpf2019
2026-01-24 21:09:00 +08:00
parent a67284afe5
commit 10d5254a7e

View File

@@ -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;