Update: 离线版下自动根据配置调整串口开启时的rtscts
This commit is contained in:
@@ -1452,6 +1452,7 @@
|
|||||||
"Mixly.Msg",
|
"Mixly.Msg",
|
||||||
"Mixly.Debug",
|
"Mixly.Debug",
|
||||||
"Mixly.MArray",
|
"Mixly.MArray",
|
||||||
|
"Mixly.Config",
|
||||||
"Mixly.Electron"
|
"Mixly.Electron"
|
||||||
],
|
],
|
||||||
"provide": [
|
"provide": [
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ goog.require('Mixly.Env');
|
|||||||
goog.require('Mixly.Msg');
|
goog.require('Mixly.Msg');
|
||||||
goog.require('Mixly.Debug');
|
goog.require('Mixly.Debug');
|
||||||
goog.require('Mixly.MArray');
|
goog.require('Mixly.MArray');
|
||||||
|
goog.require('Mixly.Config');
|
||||||
goog.require('Mixly.Electron');
|
goog.require('Mixly.Electron');
|
||||||
goog.provide('Mixly.Electron.Serial');
|
goog.provide('Mixly.Electron.Serial');
|
||||||
|
|
||||||
@@ -23,9 +24,12 @@ const {
|
|||||||
Msg,
|
Msg,
|
||||||
Debug,
|
Debug,
|
||||||
MArray,
|
MArray,
|
||||||
|
Config,
|
||||||
Electron
|
Electron
|
||||||
} = Mixly;
|
} = Mixly;
|
||||||
|
|
||||||
|
const { BOARD } = Config;
|
||||||
|
|
||||||
|
|
||||||
class ElectronSerial extends Serial {
|
class ElectronSerial extends Serial {
|
||||||
static {
|
static {
|
||||||
@@ -137,7 +141,8 @@ class ElectronSerial extends Serial {
|
|||||||
parity: 'none', // 奇偶校验
|
parity: 'none', // 奇偶校验
|
||||||
stopBits: 1, // 停止位
|
stopBits: 1, // 停止位
|
||||||
flowControl: false,
|
flowControl: false,
|
||||||
autoOpen: false // 不自动打开
|
autoOpen: false, // 不自动打开
|
||||||
|
rtscts: BOARD?.serial?.rts ?? false
|
||||||
}, false);
|
}, false);
|
||||||
this.#parserBytes_ = this.#serialport_.pipe(new ByteLengthParser({ length: 1 }));
|
this.#parserBytes_ = this.#serialport_.pipe(new ByteLengthParser({ length: 1 }));
|
||||||
this.#parserLine_ = this.#serialport_.pipe(new ReadlineParser());
|
this.#parserLine_ = this.#serialport_.pipe(new ReadlineParser());
|
||||||
|
|||||||
Reference in New Issue
Block a user