初步完成接收发卡报文

This commit is contained in:
2024-11-19 18:34:38 +08:00
parent 942f94d420
commit 480e9ab6d5
9 changed files with 183 additions and 17 deletions

View File

@@ -102,6 +102,7 @@ func Run() {
if err != nil {
zap.S().Panicln("连接 MQTT 异常: ", err)
}
utils.GlobalMqttClient = cm
// 构建语音合成对象
tts.DefaultTTS = tts.New(ctx, config.C.Aliyun)
@@ -116,7 +117,7 @@ func Run() {
//defer r.Close()
// 构建全局设备变量
device := common.DefaultDevice(ctx, cm, publishTopic)
device := common.DefaultDevice(ctx, publishTopic)
// 设备状态变化
device.OnChange = func() { device.PublishStatus() }