Update: 在线版设置选中串口后继续 烧录上传 操作

This commit is contained in:
王立帮
2024-10-12 21:25:23 +08:00
parent 0e42ca74d4
commit f82839e936
3 changed files with 49 additions and 36 deletions

View File

@@ -45,13 +45,10 @@ class WebSerial extends Serial {
Serial.renderSelectBox(portsName);
}
this.requestPort = function () {
navigator.serial.requestPort()
.then((serialport) => {
this.addPort(serialport);
this.refreshPorts();
})
.catch(Debug.error);
this.requestPort = async function () {
const serialport = await navigator.serial.requestPort();
this.addPort(serialport);
this.refreshPorts();
}
this.getPort = function (name) {