From d3ea6799865812baaa1439922d6123e70a0cccdc Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期五, 23 八月 2024 17:39:04 +0800
Subject: [PATCH] 修复otherFeature字段传送楼层信息

---
 service/nvcs.go |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/service/nvcs.go b/service/nvcs.go
index 787716a..d5b1f41 100644
--- a/service/nvcs.go
+++ b/service/nvcs.go
@@ -67,8 +67,6 @@
 
 	logger.Info("UDP server listening on port %s...", port)
 
-	var runState string
-	var iRunSate int
 	// 鏃犻檺寰幆绛夊緟鎺ユ敹鏁版嵁
 	for {
 		// 鍒涘缓涓�涓紦鍐插尯鏉ュ瓨鍌ㄦ帴鏀剁殑鏁版嵁
@@ -98,6 +96,9 @@
 			continue
 		}
 
+		var runState string
+		var iRunSate int
+
 		// 璁板綍鐢垫杩愯鐘舵��
 		iRunSate = data.Elevator[0].Status.RunDir
 		if config.NVCSConf.RunState {
@@ -106,14 +107,10 @@
 			} else if data.Elevator[0].Status.RunDir == RunDown {
 				runState = "涓�"
 			}
+		}
 
-			// 宸插埌鏈�涓嬪眰
-			if data.Elevator[0].Status.Floor == 0 {
-				runState = "涓�"
-			}
-			if data.Elevator[0].Status.Floor == data.Elevator[0].Status.TotalFloors {
-				runState = "涓�"
-			}
+		if !config.NVCSConf.RunState {
+			runState = ""
 		}
 
 		// 璁剧疆osd  鏍煎紡 "1F涓� 鍥� 鏋�"

--
Gitblit v1.8.0