初步完成接收发卡报文
This commit is contained in:
@@ -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() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user