From a4646469c0bdba09cca96eb0872b42fdb27a07b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Thu, 6 Mar 2025 20:07:11 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E4=BF=AE=E5=A4=8Dwin7=E4=B8=8Bhid?= =?UTF-8?q?=E4=B8=8A=E8=BD=BD=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/modules/mixly-modules/web/burn-upload.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/modules/mixly-modules/web/burn-upload.js b/common/modules/mixly-modules/web/burn-upload.js index 48a91b4f..8c8c06db 100644 --- a/common/modules/mixly-modules/web/burn-upload.js +++ b/common/modules/mixly-modules/web/burn-upload.js @@ -668,10 +668,11 @@ BU.uploadWithAmpy = (portName) => { mainStatusBarTabs.changeTo('output'); const mainWorkspace = Workspace.getMain(); const editor = mainWorkspace.getEditorsManager().getActive(); + const port = Serial.getPort(portName); let useBuffer = true, dataLength = 256; - if (Serial.type === 'usb') { + if (port instanceof window.USBDevice) { dataLength = 64; - } else if (Serial.type === 'hid') { + } else if (port instanceof window.HIDDevice) { dataLength = 31; } const layerNum = layer.open({