From 610a6a826a00d47320b17478cb5ca5f60abfa291 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 24 五月 2022 17:25:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/wjc' into Dev-Branch
---
HDL_ON/Entity/FunctionList.cs | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index c1b1641..9b724ca 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -72,6 +72,12 @@
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
+ public List<Function> GetDoorLockList()
+ {
+ var spkList = SPK.GetDoorLockSPKList();
+ return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ }
+
/// <summary>
/// 鏂伴鍒楄〃
/// </summary>
@@ -79,6 +85,15 @@
public List<Function> GetAirFreshList()
{
var spkList = SPK.AirFreshSpkList();
+ return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+ }
+ /// <summary>
+ /// 闈㈡澘鍒楄〃
+ /// </summary>
+ /// <returns></returns>
+ public List<Function> GetPanelList()
+ {
+ var spkList = SPK.PanelSpkList();
return Functions.FindAll((obj) => spkList.Contains(obj.spk));
}
@@ -453,12 +468,25 @@
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);
+ }
}
- 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();
@@ -475,6 +503,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