fix
liuxiaolong
2020-03-05 2c84a93c4faad5e09900fc71f045a181bdb313a6
fix
1个文件已修改
15 ■■■■ 已修改文件
controllers/camera.go 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/camera.go
@@ -54,14 +54,13 @@
type SensorVo struct {
    Id        string       `json:"id"`
    Type       int            `json:"type"`
    Type       string        `json:"type"`
    Ip           string       `json:"ip"`
    Port       int            `json:"port"`
    Username  string       `json:"username"`
    Password  string        `json:"password"`
    Threshold int            `json:"threshold"`
    Enable       bool            `json:"enable"`
    DevId        string       `json:"devId"`
}
// @Summary 添加摄像机
@@ -163,11 +162,19 @@
    m := util.Struct2Map(camera)
    m["runServerName"] = ""
    //摄像机分辨率
    dResolution := Resolution{
    dRe0 := Resolution{
        Width: 0,
        Height: 0,
    }
    m["resolutions"] = []Resolution{ dResolution }
    dRe1 := Resolution{
        Width: 1920,
        Height: 1080,
    }
    dRe2 := Resolution{
        Width: 2688,
        Height: 1520,
    }
    m["resolutions"] = []Resolution{ dRe0, dRe1, dRe2 }
    if camera.RunServerId !="" {
        localConf, e := cache.GetServerInfo()
        if e ==nil {