fix(core): 修复一些情况下板卡无法进入waiting for download模式
This commit is contained in:
@@ -224,11 +224,23 @@ class WebSerialPort extends Serial {
|
||||
}
|
||||
|
||||
async setDTR(dtr) {
|
||||
return this.setDTRAndRTS(dtr, this.getRTS());
|
||||
if (!this.isOpened()) {
|
||||
return;
|
||||
}
|
||||
await this.#serialport_.setSignals({
|
||||
dataTerminalReady: dtr
|
||||
});
|
||||
super.setDTR(dtr);
|
||||
}
|
||||
|
||||
async setRTS(rts) {
|
||||
return this.setDTRAndRTS(this.getDTR(), rts);
|
||||
if (!this.isOpened()) {
|
||||
return;
|
||||
}
|
||||
await this.#serialport_.setSignals({
|
||||
requestToSend: rts
|
||||
});
|
||||
super.setRTS(rts);
|
||||
}
|
||||
|
||||
getVID() {
|
||||
|
||||
Reference in New Issue
Block a user