修复北斗授时的bug以及为字体设计新增显示到LED屏的功能
This commit is contained in:
@@ -36,6 +36,8 @@ export const useSerialPortStore = defineStore('serialPort', {
|
||||
},
|
||||
|
||||
async open(options) {
|
||||
eventListeners[SerialPortEventType.beforeOpen]?.forEach((cb: Function) => cb(this))
|
||||
|
||||
if ( !options ) throw new Error('缺少串口配置参数')
|
||||
|
||||
if ( !this.instance ) throw new Error('未选择串口设备')
|
||||
@@ -87,7 +89,11 @@ export const useSerialPortStore = defineStore('serialPort', {
|
||||
}
|
||||
}
|
||||
|
||||
eventListeners[SerialPortEventType.beforeClose]?.forEach((cb: Function) => cb(this))
|
||||
|
||||
await this.instance.close()
|
||||
|
||||
eventListeners[SerialPortEventType.afterClose]?.forEach((cb: Function) => cb(this))
|
||||
},
|
||||
|
||||
async close() {
|
||||
|
||||
Reference in New Issue
Block a user