Update: 调整micropython_esp32c2配置
This commit is contained in:
@@ -68,7 +68,7 @@
|
|||||||
"devices": {
|
"devices": {
|
||||||
"serial": true,
|
"serial": true,
|
||||||
"hid": true,
|
"hid": true,
|
||||||
"usb": false
|
"usb": true
|
||||||
},
|
},
|
||||||
"burn": {
|
"burn": {
|
||||||
"erase": true,
|
"erase": true,
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
"devices": {
|
"devices": {
|
||||||
"serial": true,
|
"serial": true,
|
||||||
"hid": true,
|
"hid": true,
|
||||||
"usb": false
|
"usb": true
|
||||||
},
|
},
|
||||||
"burn": {
|
"burn": {
|
||||||
"erase": true,
|
"erase": true,
|
||||||
|
|||||||
@@ -20,8 +20,10 @@ const {
|
|||||||
const { BOARD } = Config;
|
const { BOARD } = Config;
|
||||||
|
|
||||||
let Device = SerialPort;
|
let Device = SerialPort;
|
||||||
|
const platform = goog.platform();
|
||||||
|
const fullPlatform = goog.fullPlatform();
|
||||||
|
|
||||||
if (goog.platform() === 'win32' && goog.fullPlatform() !== 'win10') {
|
if (platform === 'win32' && fullPlatform !== 'win10') {
|
||||||
if (BOARD?.web?.devices?.hid) {
|
if (BOARD?.web?.devices?.hid) {
|
||||||
Device = HID;
|
Device = HID;
|
||||||
} else if (BOARD?.web?.devices?.serial) {
|
} else if (BOARD?.web?.devices?.serial) {
|
||||||
@@ -33,8 +35,12 @@ if (goog.platform() === 'win32' && goog.fullPlatform() !== 'win10') {
|
|||||||
Device = USBMini;
|
Device = USBMini;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (goog.platform() === 'android') {
|
} else if (fullPlatform === 'android') {
|
||||||
Device = USB;
|
if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) {
|
||||||
|
Device = USB;
|
||||||
|
} else {
|
||||||
|
Device = USBMini;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (BOARD?.web?.devices?.serial) {
|
if (BOARD?.web?.devices?.serial) {
|
||||||
Device = SerialPort;
|
Device = SerialPort;
|
||||||
|
|||||||
Reference in New Issue
Block a user