From 681e990f8c3e51672ad1e37440f35d960f9f56c1 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 07 十二月 2022 10:40:58 +0800
Subject: [PATCH] 2022年12月07日10:39:43
---
HDL-ON_iOS/Resources/Language.ini | 3 +++
HDL_ON/Entity/Function/Function.cs | 4 ++++
HDL-ON_Android/Assets/Language.ini | 2 ++
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 15 +++++++++++----
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 1 +
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 15 +++++++++++++++
HDL_ON/Common/R.cs | 6 +++++-
7 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 18486ef..e04a720 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1118,6 +1118,7 @@
7165=Area intrusion alarm
7166=camera
7167=main switch
+7168=pm10
@@ -2340,6 +2341,7 @@
7165=鍖哄煙鍏ヤ镜鍛婅
7166=鎽勫儚澶�
7167=鎬绘帶寮�鍏�
+7168=pm10
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 23ba050..e63e35e 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1118,6 +1118,8 @@
7165=Area intrusion alarm
7166=camera
7167=main switch
+7168=pm10
+
@@ -2339,6 +2341,7 @@
7165=鍖哄煙鍏ヤ镜鍛婅
7166=鎽勫儚澶�
7167=鎬绘帶寮�鍏�
+7168=pm10
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 136f9a9..1de55d8 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3050,7 +3050,11 @@
/// 鎬绘帶寮�鍏�
/// </summary>
public const int zongkogkaiguan = 7167;
-
+ /// <summary>
+ /// PM210
+ /// </summary>
+ public const int pm10= 7168;
+
#region LE鏂板
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index e7a7da8..eba6ec8 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1673,6 +1673,10 @@
#region 鐜浼犳劅鍣�
/// <summary>
+ /// 锛圥M10浼犳劅鍣級
+ /// </summary>
+ public const string SensorPm10 = "sensor.pm10";
+ /// <summary>
/// 锛堟俯搴︿紶鎰熷櫒锛�
/// </summary>
public const string SensorTemperature = "sensor.temperature";
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 064ddef..2e237f6 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -466,6 +466,21 @@
};
}
break;
+ //pm210
+ case SPK.SensorPm10:
+ {
+ ///pm210
+ LogicView.FunTypeView pm10View = new LogicView.FunTypeView();
+ pm10View.btnText.TextID = StringId.pm10;
+ fLayout.AddChidren(pm10View.FLayoutView());
+
+ ///pm10鐐瑰嚮浜嬩欢
+ pm10View.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ PmCo2TvocAction(this, device, "pm10", StringId.pm10, index, edit);
+ };
+ }
+ break;
//pm2.5
case SPK.SensorPm25:
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 4d994e1..27544e7 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -386,6 +386,7 @@
}
break;
+ case SPK.SensorPm10:
case SPK.SensorCO2:
case SPK.SensorPm25:
case SPK.SensorTVOC:
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index c4db742..40ba375 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -187,7 +187,7 @@
var list2 = this.GetVideoDeviceList();
list.AddRange(list1);
list.AddRange(list2);
- GetTestDevice(ref list, true);
+ //GetTestDevice(ref list, true);
return list;
}
/// <summary>
@@ -349,13 +349,16 @@
/// </summary>
/// <param name="device">璁惧</param>
/// <returns></returns>
- public string GetDeviceIconPath(Function device)
+ public string GetDeviceIconPath(Function device)
{
-
if (SPK.MusicStandard == device.spk
|| SPK.AvMusic == device.spk)
{
return "MusicIcon/localMusic.png";
+ }
+ else if (SPK.SensorPm10 == device.spk)
+ {
+ return "LogicIcon/sensor.png";
}
//LogicIcon/heatlogic.png"
return $"FunctionIcon/Icon/{device.IconName}.png";
@@ -552,6 +555,7 @@
|| device.spk == SPK.SensorTVOC
|| device.spk == SPK.SensorHcho
|| device.spk == SPK.SensorHelp
+ || device.spk == SPK.SensorPm10
);
if (sensor != null)
{
@@ -673,6 +677,7 @@
functionTypeList.Add(SPK.SensorTVOC);
functionTypeList.Add(SPK.SensorHcho);
functionTypeList.Add(SPK.SensorHelp);
+ functionTypeList.Add(SPK.SensorPm10);
}
@@ -763,6 +768,7 @@
functionTypeList.Add(SPK.doorgate);
functionTypeList.Add(SPK.MechanicalArm);
functionTypeList.Add(SPK.IpCam_Imou);
+ functionTypeList.Add(SPK.SensorPm10);
}
@@ -821,6 +827,7 @@
deviceTypeList.Add(SPK.DoorLock);
deviceTypeList.Add(SPK.doorgate);
deviceTypeList.Add(SPK.IpCam_Imou);
+ deviceTypeList.Add(SPK.SensorPm10);
}
break;
@@ -1164,7 +1171,7 @@
// new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity },
new Entity.Function { sid = "12345678933456", name = "璋冨厜鐏�", spk = Entity.SPK.LightDimming },
new Entity.Function { sid = "1234567895444", name = "闈㈡澘", spk = Entity.SPK.PanelSocket },
- //new Entity.Function { sid = "1234567896", name = "姣背娉紶鎰熷櫒", spk = Entity.SPK.SenesorMegahealth },
+ new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 },
// new Entity.Function { sid = "1234567897", name = "姣背娉紶鎰熷櫒1", spk = Entity.SPK.SenesorMegahealth2 },
// new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow },
// new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
--
Gitblit v1.8.0