Compare commits
2 Commits
c796add419
...
379f4c8778
| Author | SHA1 | Date | |
|---|---|---|---|
| 379f4c8778 | |||
| 273340189d |
@ -444,6 +444,7 @@ function openChuankouFn(callback) {
|
||||
if(carInfo.kscx == 'C1'){
|
||||
testNapi.SerialOpenAsync(devPath, (fd) => {
|
||||
globalThis.fd = fd;
|
||||
globalThis.ChounkouInit = true;
|
||||
globalThis.num = 0
|
||||
let parity = 0x4e; // 'N'
|
||||
let ret = testNapi.SerialSetAsync(globalThis.fd, 115200, 0, 8, 1, parity, (ret) => {
|
||||
|
||||
@ -32,6 +32,7 @@ import { GlobalConfig } from '../../config/index';
|
||||
import prompt from '@ohos.promptAction'
|
||||
import DB, { ColumnType } from '../database/DbSql';
|
||||
import { MA_SYS_SET_COLUMN } from '../../model/Table';
|
||||
import { getChuankouFn } from '../service/indexService'
|
||||
|
||||
// @ts-nocheck
|
||||
//读表
|
||||
@ -455,6 +456,10 @@ export async function upDataZhongxinginitialization(param) {
|
||||
resolve(false)
|
||||
}
|
||||
}
|
||||
// 初始化串口
|
||||
if(!globalThis.ChounkouInit){
|
||||
getChuankouFn()
|
||||
}
|
||||
resolve(true)
|
||||
}).catch((Error) => {
|
||||
console.log("init table5", JSON.stringify(Error))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user