fix(core): 修复一些情况下串口波特率设置异常
This commit is contained in:
@@ -180,7 +180,7 @@ class ElectronSerial extends Serial {
|
||||
async setBaudRate(baud) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!this.isOpened()
|
||||
|| this.getBaudRate() === baud
|
||||
|| this.getRawBaudRate() === baud
|
||||
|| !this.baudRateIsLegal(baud)) {
|
||||
resolve();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user