fix: 串口问题
This commit is contained in:
parent
cbb64fdf42
commit
77523adcb2
@ -9,7 +9,6 @@ import {
|
||||
} from '../SerialPort';
|
||||
import Prompt from '@system.prompt';
|
||||
import { SerialPortTag } from '../../config';
|
||||
import { EnvironmentConfigurationType } from '../../model';
|
||||
|
||||
class serialPortService {
|
||||
private fd: number = -1
|
||||
@ -21,11 +20,6 @@ class serialPortService {
|
||||
private tryCount: number = 0
|
||||
|
||||
async init() {
|
||||
let config: EnvironmentConfigurationType = AppStorage.get<EnvironmentConfigurationType>("EnvironmentConfiguration")!
|
||||
if (config.manufacturer === "2") {
|
||||
console.log(SerialPortTag, "更改润和串口端口")
|
||||
this.serialPort = "/dev/ttyS7"
|
||||
}
|
||||
const res = await OpenSerialPort(this.serialPort)
|
||||
if (res === -1) {
|
||||
Prompt.showToast({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user