From f5268d43584a1f72cb7b19c17232645c24e2348b Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 17 十二月 2020 15:29:31 +0800
Subject: [PATCH] 20201217-3
---
HDL_ON/DAL/DriverLayer/Packet.cs | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/DAL/DriverLayer/Packet.cs b/HDL_ON/DAL/DriverLayer/Packet.cs
index 8bfb416..4fb8e85 100644
--- a/HDL_ON/DAL/DriverLayer/Packet.cs
+++ b/HDL_ON/DAL/DriverLayer/Packet.cs
@@ -163,12 +163,12 @@
case Command.ReadLightAllLoopBrightnessACK:
for (int i = 0; i < receiveBytes[0]; i++)
{
- var light = FunctionList.List.lights.Find((obj) => obj.bus.SubnetID == subnetID && obj.bus.DeviceID == deviceID && obj.bus.loopId == (i + 1));
+ var light = FunctionList.List.lights.Find((obj) => obj.bus.SubnetID == subnetID && obj.bus.DeviceID == deviceID && obj.bus.LoopId == (i + 1));
if (light != null)
{
if (light.functionType != FunctionType.RGB)
{
- light.trait_on_off.curValue = receiveBytes[light.bus.loopId] == 0 ? "off" : "on";
+ light.trait_on_off.curValue = receiveBytes[light.bus.LoopId] == 0 ? "off" : "on";
if (light.trait_on_off.curValue.ToString() == "on")
{
light.brightness = receiveBytes[2];
@@ -191,7 +191,7 @@
}
else
{
- var e = FunctionList.List.electricals.Find((obj) => obj.bus.SubnetID == subnetID && obj.bus.DeviceID == deviceID && obj.bus.loopId == i);
+ var e = FunctionList.List.electricals.Find((obj) => obj.bus.SubnetID == subnetID && obj.bus.DeviceID == deviceID && obj.bus.LoopId == i);
if (e != null)
{
var fan = e as Fan;
@@ -264,7 +264,7 @@
}
else
{
- if (curtain.bus.loopId != receiveBytes[0])
+ if (curtain.bus.LoopId != receiveBytes[0])
continue;
switch (receiveBytes[1])
{
@@ -446,7 +446,7 @@
if (sensor.bus != null)
{
if ((int)sensor.functionType % 256 == receiveBytes[1] && sensor.bus.SubnetID == subnetID &&
- sensor.bus.DeviceID == deviceID && sensor.bus.loopId == receiveBytes[2])
+ sensor.bus.DeviceID == deviceID && sensor.bus.LoopId == receiveBytes[2])
{
switch (dt)
{
@@ -479,7 +479,7 @@
if (sensor.bus != null)
{
if ((int)sensor.functionType % 256 == receiveBytes[1] && sensor.bus.SubnetID == subnetID &&
- sensor.bus.DeviceID == deviceID && sensor.bus.loopId == receiveBytes[2])
+ sensor.bus.DeviceID == deviceID && sensor.bus.LoopId == receiveBytes[2])
{
//0淇濈暀 1鏃犵鍙�4Byte鏁村舰 2鏈夌鍙�4Byte鏁村舰 3Float褰紙浠B憋級
switch (receiveBytes[3])
@@ -642,12 +642,12 @@
receiveFlag += string.Format("{0},{1}", usefulBytes[0], usefulBytes[1]);
break;
case Command.ReadRemark:
- DriverLayer.Control.Ins.myUdp.ReceiveReadRemark(usefulBytes);
+ new Control_Udp().ReceiveReadRemark(usefulBytes);
break;
default:
break;
}
- DriverLayer.Control.Ins.myUdp.ReceiveRepeatManager(receiveFlag);
+ Control_Udp.ReceiveRepeatManager(receiveFlag,usefulBytes);
}
catch (Exception ex)
{
--
Gitblit v1.8.0