完善配置,添加是否启动tcpserver配置项
This commit is contained in:
parent
41d2d2d3ee
commit
d82e284bb7
|
@ -210,5 +210,6 @@
|
|||
"websocketurl": ["192.168.3.216:8080", "/echo"],
|
||||
"post_to_server": "https://smartoilets.cn/socketServer/statis/push",
|
||||
"debug": true,
|
||||
"openserial":false
|
||||
"openserial":false,
|
||||
"open_tcp_server":false
|
||||
}
|
||||
|
|
|
@ -27,8 +27,12 @@ type Conf struct {
|
|||
WEBSOCKETURL []string `json:"websocketurl"`
|
||||
POST_TO_SERVER string `json:"post_to_server"`
|
||||
DEBUG bool `json:"debug"`
|
||||
//是否初始化时打开串口
|
||||
OPENSERIAL bool `json:"openserial"`
|
||||
//无线 设备
|
||||
WIRELESSSLAVEDEVICES []WirelessSlaveDevice `json:"wireless_slave_devices"`
|
||||
//是否启动tcpserver
|
||||
OPENTCPSETVER bool `json:"open_tcp_server"`
|
||||
}
|
||||
|
||||
//无线 下位机
|
||||
|
@ -117,7 +121,7 @@ func init() {
|
|||
log.Println("init demoDevice success:", demoDevice)
|
||||
|
||||
airDevice.DATA = make(map[string]interface{})
|
||||
airDevice.DATA["data"]=0
|
||||
airDevice.DATA["data"] = 0
|
||||
|
||||
dbdata_init()
|
||||
|
||||
|
|
Loading…
Reference in New Issue