Update: Arduino下自动根据代码中设置的串口波特率配置串口监视器 (#IAWTZG)
This commit is contained in:
@@ -191,7 +191,9 @@ class WebSerial extends Serial {
|
||||
|
||||
async setBaudRate(baud) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.isOpened() || this.getBaudRate() === baud) {
|
||||
if (!this.isOpened()
|
||||
|| this.getBaudRate() === baud
|
||||
|| !this.baudRateIsLegal(baud)) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user