修复北斗授时的bug以及为字体设计新增显示到LED屏的功能

This commit is contained in:
2023-10-16 13:55:56 +08:00
parent a292e1aca6
commit 5120201397
11 changed files with 183 additions and 51 deletions

View File

@@ -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() {