fix(websocket-arduino): 在 init 中同时初始化 WebCompiler.ArduShell
This commit is contained in:
@@ -51,6 +51,12 @@ goog.loadJs('web', () => {
|
|||||||
this.shell = new WebSocketArduShell();
|
this.shell = new WebSocketArduShell();
|
||||||
const socket = this.socket;
|
const socket = this.socket;
|
||||||
|
|
||||||
|
// 同时初始化 WebCompiler.ArduShell,用于本地上传
|
||||||
|
const WebCompilerArduShell = getWebCompilerArduShell();
|
||||||
|
if (WebCompilerArduShell && !WebCompilerArduShell.getMixlySocket()) {
|
||||||
|
WebCompilerArduShell.init(mixlySocket);
|
||||||
|
}
|
||||||
|
|
||||||
socket.on('arduino.dataEvent', (data) => {
|
socket.on('arduino.dataEvent', (data) => {
|
||||||
if (data.length > 1000) {
|
if (data.length > 1000) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user