chengqian 4 bulan lalu
induk
melakukan
bcc4e74869

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/smartIntersection_edge.iml" filepath="$PROJECT_DIR$/.idea/smartIntersection_edge.iml" />
+    </modules>
+  </component>
+</project>

+ 9 - 0
.idea/smartIntersection_edge.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

TEMPAT SAMPAH
build/smart_intersectionV2.0


+ 2 - 2
dev/devs.json

@@ -1,8 +1,8 @@
 {
   "ledScreens": [
     {
-      "Sn": "071995171560000000c40808",
-      "ScreensName": "测试屏幕三"
+      "Sn": "07dd95171560000000c40810",
+      "ScreensName": "测试lc"
     }
   ]
 }

+ 4 - 0
mqtt/mqttclient.go

@@ -50,6 +50,10 @@ func NewMqttClient(server, clientId, user, password string, timeout uint, mqttOn
 	}
 	o.mqtt = client
 	err = client.Connect(o.Ctx())
+	if err != nil {
+		logger.Logger.Errorln("MClient.NewMqttClient: Connect err,原因:", err)
+		return nil
+	}
 	return &o
 }
 

+ 1 - 0
service/deviceMgr.go

@@ -56,6 +56,7 @@ func (s *Device) Process() {
 		data := string(buf[:n])
 		//fmt.Println("读取", string(buf[:n]), time.Now())
 		if data[2:7] == "login" {
+			fmt.Println("登录 login*****")
 			s.Conn.Write([]byte("login:successful"))
 		}
 

+ 2 - 0
service/tcp.go

@@ -2,6 +2,7 @@ package service
 
 import (
 	"errors"
+	"fmt"
 	"net"
 	"strings"
 	"sync"
@@ -25,6 +26,7 @@ func ListenTcp() {
 
 	for {
 		conn, err := listen.Accept()
+		fmt.Println("监听连接:", conn.LocalAddr())
 		if err != nil {
 			continue
 		}