Skip to content

Commit

Permalink
Fix event action/trigger initialization issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jldubz committed Sep 10, 2019
1 parent 3dd603f commit ba921c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion HSPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public override string PostBackProc(string page, string data, string user, int u

//Handle each trigger that matches
foreach (var configuredTrigger in configuredTriggers) {
var trig = new SampleTriggerType(configuredTrigger);
var trig = new SampleTriggerType(configuredTrigger, this, LogDebug);
if (trig.ShouldTriggerFire(triggerOptions.ToArray())) {
HomeSeerSystem.TriggerFire(Name, configuredTrigger);
}
Expand Down
4 changes: 2 additions & 2 deletions SampleTriggerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ public bool ShouldTriggerFire(params bool[] triggerOptions) {
}

/// <inheritdoc />
public SampleTriggerType(TrigActInfo trigInfo) : base(trigInfo) { }
public SampleTriggerType(TrigActInfo trigInfo, TriggerTypeCollection.ITriggerTypeListener listener, bool logDebug = false) : base(trigInfo, listener, logDebug) { }
/// <inheritdoc />
/// <remarks>
/// All trigger types must implement this constructor
/// </remarks>
public SampleTriggerType(int id, int eventRef, int selectedSubTriggerIndex, byte[] dataIn) : base(id, eventRef, selectedSubTriggerIndex, dataIn) { }
public SampleTriggerType(int id, int eventRef, int selectedSubTriggerIndex, byte[] dataIn, TriggerTypeCollection.ITriggerTypeListener listener, bool logDebug = false) : base(id, eventRef, selectedSubTriggerIndex, dataIn, listener, logDebug) { }
/// <inheritdoc />
/// <remarks>
/// All trigger types must implement this constructor
Expand Down
2 changes: 1 addition & 1 deletion WriteLogSampleActionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class WriteLogSampleActionType : AbstractActionType {
/// <remarks>
/// All action types must implement this constructor
/// </remarks>
public WriteLogSampleActionType(int id, int eventRef, byte[] dataIn) : base(id, eventRef, dataIn) { }
public WriteLogSampleActionType(int id, int eventRef, byte[] dataIn, ActionTypeCollection.IActionTypeListener listener, bool logDebug = false) : base(id, eventRef, dataIn, listener, logDebug) { }
/// <inheritdoc />
/// <remarks>
/// All trigger types must implement this constructor
Expand Down

0 comments on commit ba921c7

Please sign in to comment.