Skip to content

Commit

Permalink
reduced RF repeat delay;
Browse files Browse the repository at this point in the history
  • Loading branch information
genemars committed Dec 9, 2018
1 parent a9918ca commit 62f373a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions XTenLib/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public enum X10Command
Off,
Dim,
Bright,
All_Lights_Off,
Extended_Code,
Hail_Request,
Hail_Acknowledge,
Expand Down Expand Up @@ -130,8 +129,8 @@ public enum X10RfFunction
NotSet = 0xFF,
On = 0x00,
Off = 0x01,
AllLightsOff = 0x80,
AllLightsOn = 0x90,
AllUnitsOff = 0x80,
Dim = 0x98,
Bright = 0x88
}
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions XTenLib/XTenManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 62f373a

Please sign in to comment.