From d9feb1d52963982a89a6e6d741a9b841042ce0b6 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 22 七月 2022 17:22:41 +0800 Subject: [PATCH] 毫米波传感器,温控一体化 --- HDL_ON/Entity/FunctionList.cs | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 55d26a3..9dce5c5 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -459,12 +459,26 @@ if(DriverLayer.Control.Ins.GatewayOnline_Local) { + + //List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl); + //var sss = functions.OrderBy((obj) => obj.collect); + + List<Function> readList = new List<Function>(); foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) { + readList.Add(function); MainPage.Log($"璇诲彇鍔熻兘鐘舵�侊細{function.name} : {function.sid} "); - Control.Ins.SendReadCommand(function); + if (readList.Count > 9) + { + Control.Ins.SendReadCommand(readList); + readList.Clear(); + } } - if(DB_ResidenceData.Instance.GatewayType == 1) + if (readList.Count > 0) + { + Control.Ins.SendReadCommand(readList); + } + if (DB_ResidenceData.Instance.GatewayType == 1) { Dictionary<string, string> pairs = new Dictionary<string, string>(); string sendId = Control.Ins.msg_id.ToString(); @@ -481,6 +495,8 @@ var page = new List<string>(); int count = 0; + //List<Function> functions = GetDeviceFunctionList(SPK.BrandType.Hdl); + //var sss = functions.OrderBy((obj) => obj.collect); foreach (var function in GetDeviceFunctionList(SPK.BrandType.Hdl)) { page.Add(function.deviceId); -- Gitblit v1.8.0