dpark地点添加为配置项

This commit is contained in:
fish 2019-05-07 16:07:57 +08:00
parent 6d960f50f8
commit 699b2a5273
3 changed files with 4 additions and 2 deletions

View File

@ -211,5 +211,6 @@
"debug": true, "debug": true,
"openserial":false, "openserial":false,
"open_tcp_server":true, "open_tcp_server":true,
"check_serial":true "check_serial":true,
"dpark_location":"spaoDevs"
} }

View File

@ -36,6 +36,7 @@ type Conf struct {
OPENTCPSETVER bool `json:"open_tcp_server"` OPENTCPSETVER bool `json:"open_tcp_server"`
CHECKSERIAL bool `json:"check_serial"` CHECKSERIAL bool `json:"check_serial"`
LORANODES []LoraNode `json:"lora_nodes"` LORANODES []LoraNode `json:"lora_nodes"`
DPARKLOCATION string `json:"dpark_location"`
} }
//无线 下位机 //无线 下位机

View File

@ -120,7 +120,7 @@ func yunhorn_hb_dpark_v1(){
//心跳数据 //心跳数据
R_data.CODE = 1009 R_data.CODE = 1009
//spao点的公厕 //spao点的公厕
R_data.ID = "spaoDevs" R_data.ID = conf.DPARKLOCATION
//尿布台 //尿布台
R_data.VERSION = "yunhorn_hb_dpark" R_data.VERSION = "yunhorn_hb_dpark"
R_data.ONLINE = true R_data.ONLINE = true