@@ -24,11 +24,11 @@ const platform = goog.platform();
|
||||
const fullPlatform = goog.fullPlatform();
|
||||
|
||||
if (platform === 'win32' && fullPlatform !== 'win10') {
|
||||
if (BOARD?.web?.devices?.hid && navigator.hid) {
|
||||
if (BOARD?.web?.devices?.hid) {
|
||||
Device = HID;
|
||||
} else if (BOARD?.web?.devices?.serial && navigator.serial) {
|
||||
} else if (BOARD?.web?.devices?.serial) {
|
||||
Device = SerialPort;
|
||||
} else if (BOARD?.web?.devices?.usb && navigator.usb) {
|
||||
} else if (BOARD?.web?.devices?.usb) {
|
||||
if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) {
|
||||
Device = USB;
|
||||
} else {
|
||||
@@ -42,15 +42,15 @@ if (platform === 'win32' && fullPlatform !== 'win10') {
|
||||
Device = USBMini;
|
||||
}
|
||||
} else {
|
||||
if (BOARD?.web?.devices?.serial && navigator.serial) {
|
||||
if (BOARD?.web?.devices?.serial) {
|
||||
Device = SerialPort;
|
||||
} else if (BOARD?.web?.devices?.usb && navigator.usb) {
|
||||
} else if (BOARD?.web?.devices?.usb) {
|
||||
if (['BBC micro:bit', 'Mithon CC'].includes(BOARD.boardType)) {
|
||||
Device = USB;
|
||||
} else {
|
||||
Device = USBMini;
|
||||
}
|
||||
} else if (BOARD?.web?.devices?.hid && navigator.hid) {
|
||||
} else if (BOARD?.web?.devices?.hid) {
|
||||
Device = HID;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user