实现基本信息的变更

This commit is contained in:
yezhichao
2021-11-23 01:17:36 +08:00
parent 46ac007a4f
commit 59521a7501
9 changed files with 99 additions and 53 deletions

View File

@@ -1,6 +1,5 @@
const { ipcMain } = require('electron')
const SerialPort = require('serialport')
// const Readline = require('@serialport/parser-readline')
const InterByteTimeout = require('@serialport/parser-inter-byte-timeout')
const config = require('./config')
@@ -42,7 +41,6 @@ SerialPort.list().then((ports, err) => {
const { path, baudRate } = getSerialPortConstructorArguments(ports)
const serialPort = new SerialPort(path, { baudRate })
// const parser = serialPort.pipe(new Readline({ delimiter: '\r\n' }))
const parser = serialPort.pipe(new InterByteTimeout({interval: 30}))
NMEAHandler.on('handled' , (nmeaObj) => {