From 7a2e14a72aa75d3dbdbe0944be2a05b88866150f Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期四, 22 八月 2024 17:47:19 +0800 Subject: [PATCH] 修复楼层运行状态的记录 --- service/nvcs.go | 25 +++++++++++++------------ 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/service/nvcs.go b/service/nvcs.go index 6ea3caf..51bbba9 100644 --- a/service/nvcs.go +++ b/service/nvcs.go @@ -216,14 +216,15 @@ func NVCSA2WebServer() { // 鍏堣幏鍙栨�绘ゼ灞傛暟, 璁板綍鏈�楂樺眰 - GetA2ElevatorConfig() - var runState string - var iRunState int + //GetA2ElevatorConfig() r := gin.Default() r.POST("/", func(c *gin.Context) { var req A2ElevatorData + var runState string + var iRunState int + err := c.BindJSON(&req) if err != nil { c.JSON(http.StatusBadRequest, nil) @@ -241,15 +242,15 @@ iRunState = RunDown } - // 宸插埌鏈�涓嬪眰 - if req.State.Floor == A2BottomFloor { - runState = "涓�" - iRunState = RunUp - } - if req.State.Floor == A2TopFloor { - runState = "涓�" - iRunState = RunDown - } + //// 宸插埌鏈�涓嬪眰 + //if req.State.Floor == A2BottomFloor { + // runState = "涓�" + // iRunState = RunUp + //} + //if req.State.Floor == A2TopFloor { + // runState = "涓�" + // iRunState = RunDown + //} if config.NVCSConf.OSD != "" { floorText := fmt.Sprintf("%s%s %s", req.State.Floor, runState, config.NVCSConf.OSD) -- Gitblit v1.8.0