niujiuru 2 недель назад
Родитель
Сommit
ec2a0dfebe

BIN
docs/拍照性诱智能监测设备与大数据平台间的通信协议.docx


+ 2 - 2
reporter/reporter.go

@@ -247,7 +247,7 @@ func (r *MQTTReporter) reportMcuCfg(cfg *mcu.Config) {
 			return
 		}
 
-		req, err := jsonrpc2.BuildNotification("report_config_data", cfg)
+		req, err := jsonrpc2.BuildNotification("report_config", cfg)
 		if err != nil {
 			baseapp.Logger.Errorf("[%s] 构建通知失败: %v!!", MODULE_NAME, err)
 			return
@@ -382,7 +382,7 @@ func (r *MQTTReporter) execOneCmd(msg mqtt.Message) {
 
 	switch req.Method {
 	// 下发配置参数
-	case "set_config_data":
+	case "set_config":
 		var cfg mcu.Config
 		err := json.Unmarshal(req.Params, &cfg)
 		if err == nil {