| | |
| | | "fmt" |
| | | "io/ioutil" |
| | | "net" |
| | | "strings" |
| | | "time" |
| | | |
| | | "gat1400Exchange/config" |
| | |
| | | continue |
| | | } |
| | | |
| | | // 设置osd 格式 "1F停 固 枪" |
| | | // 设置osd 格式 "1F 固 枪" |
| | | if config.NVCSConf.OSD != "" { |
| | | floorText := data.Elevator[0].Status.FloorName |
| | | if data.Elevator[0].Status.RunDir == RunStop { |
| | | floorText = floorText + "停" |
| | | } else if data.Elevator[0].Status.RunDir == RunUp { |
| | | floorText = floorText + "上" |
| | | } else { |
| | | floorText = floorText + "下" |
| | | } |
| | | //if data.Elevator[0].Status.RunDir == RunStop { |
| | | // floorText = floorText + "停" |
| | | //} else if data.Elevator[0].Status.RunDir == RunUp { |
| | | // floorText = floorText + "上" |
| | | //} else { |
| | | // floorText = floorText + "下" |
| | | //} |
| | | |
| | | floorText = floorText + " " + config.NVCSConf.OSD |
| | | |
| | |
| | | elevator := data.Elevator[0] |
| | | |
| | | // 程序部署在设备端, 字符叠加器上报的名称允许为空. 在云端, 名称必须与摄像机相同 |
| | | if config.ServeConf.Role != "agent" { |
| | | elevator.Name = strings.Trim(elevator.Name, " ") |
| | | if elevator.Name == "" { |
| | | continue |
| | | } |
| | | elevator.Name = "1" |
| | | } |
| | | |
| | | var d = models.Positions{ |