From 62f373acde8996d0e888c2ad77a98172ca56afe8 Mon Sep 17 00:00:00 2001 From: Generoso Martello Date: Sun, 9 Dec 2018 23:40:50 +0100 Subject: [PATCH] reduced RF repeat delay; --- XTenLib/Enums.cs | 6 +++--- XTenLib/XTenManager.cs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/XTenLib/Enums.cs b/XTenLib/Enums.cs index 0908f59..c03771f 100644 --- a/XTenLib/Enums.cs +++ b/XTenLib/Enums.cs @@ -40,7 +40,6 @@ public enum X10Command Off, Dim, Bright, - All_Lights_Off, Extended_Code, Hail_Request, Hail_Acknowledge, @@ -130,8 +129,8 @@ public enum X10RfFunction NotSet = 0xFF, On = 0x00, Off = 0x01, - AllLightsOff = 0x80, AllLightsOn = 0x90, + AllUnitsOff = 0x80, Dim = 0x98, Bright = 0x88 } @@ -161,7 +160,8 @@ public enum X10RfSecurityEvent DoorSensor2_BatteryLow = 0x05, DoorSensor2_BatteryOk = 0x85, - Remote_Arm = 0x06, + Remote_ArmAway = 0x06, + Remote_ArmHome = 0x0E, Remote_Disarm = 0x86, Remote_LightOn = 0x46, Remote_LightOff = 0xC6, diff --git a/XTenLib/XTenManager.cs b/XTenLib/XTenManager.cs index 36a2d01..2b3c00c 100644 --- a/XTenLib/XTenManager.cs +++ b/XTenLib/XTenManager.cs @@ -75,7 +75,7 @@ public class XTenManager private DateTime waitAckTimestamp = DateTime.Now; private DateTime lastReceivedTs = DateTime.Now; // Variables used for preventing duplicated messages coming from RF - private const uint MinRfRepeatDelayMs = 500; + private const uint MinRfRepeatDelayMs = 100; private DateTime lastRfReceivedTs = DateTime.Now; private string lastRfMessage = ""; @@ -957,7 +957,7 @@ private void ReaderTask() OnRfCommandReceived(new RfCommandReceivedEventArgs(hf, X10HouseCode.NotSet, X10UnitCode.Unit_NotSet)); break; case X10RfFunction.AllLightsOn: - case X10RfFunction.AllLightsOff: + case X10RfFunction.AllUnitsOff: if (houseCode != X10HouseCode.NotSet) { logger.Debug("Command {0} HouseCode {1}", hf, houseCode); @@ -1083,7 +1083,7 @@ private void ReaderTask() switch (command) { - case X10Command.All_Lights_Off: + case X10Command.All_Units_Off: if (houseCode != X10HouseCode.NotSet) CommandEvent_AllUnitsOff(houseCode); break;