Procházet zdrojové kódy

圣牧自动补料

baishaojie před 1 dnem
rodič
revize
16d9240369
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      http/handle/api/mqtt.go
  2. binární
      tmr-watch.exe

+ 2 - 2
http/handle/api/mqtt.go

@@ -362,7 +362,7 @@ func dustingPush(c MQTT.Client, pubTopic, date string) {
 	if len(dataList) > 0 {
 		b, _ := json.Marshal(dataList)
 		pushStr = fmt.Sprintf(pushStr, setting.YynserverSetting.FarmId, len(dataList), string(b))
-		token := c.Publish(pubTopic, 2, false, pushStr)
+		 c.Publish(pubTopic, 2, false, pushStr)
 		// fmt.Println("publish msg: ", pushStr, token.Error())
 		// token.Wait()
 		// time.Sleep(2 * time.Second)
@@ -373,7 +373,7 @@ func dustingPush(c MQTT.Client, pubTopic, date string) {
 func deviceHeartbeat(c MQTT.Client, pubTopic string) {
 	pushStr := fmt.Sprintf(`{"data_collect_number":%s,"status":true,"model_type":"heartbeat"}`, setting.YynserverSetting.HeartBeat)
 
-	token := c.Publish(pubTopic, 2, false, pushStr)
+	c.Publish(pubTopic, 2, false, pushStr)
 	// fmt.Println("publish msg: ", pushStr, token.Error())
 	// token.Wait()
 	// go func() {

binární
tmr-watch.exe