Update: 调整fullPlatform下对各系统的判断顺序

This commit is contained in:
王立帮
2025-01-20 09:31:31 +08:00
parent 4f6ec33e89
commit d9e41b76c8
3 changed files with 6 additions and 6 deletions

View File

@@ -657,12 +657,12 @@ BU.uploadWithAmpy = (portName) => {
const mainWorkspace = Workspace.getMain();
const editor = mainWorkspace.getEditorsManager().getActive();
let useBuffer = true, dataLength = 256;
if (BOARD.web.com === 'usb') {
if (BOARD?.web?.devices?.usb) {
useBuffer = true;
dataLength = 64;
} else if (BOARD.web.com === 'hid') {
} else if (BOARD?.web?.devices?.hid) {
useBuffer = true;
dataLength = 30;
dataLength = 31;
}
layer.open({
type: 1,