mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Corrects spelling mistake and adds check to see if thread is already running before allowing sequence to start
This commit is contained in:
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core.Utilities
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// A device that executes a sequence of actions with optional delays between actions
|
/// A device that executes a sequence of actions with optional delays between actions
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Description("A device that exectues a sequence of actions with optional delays between actions")]
|
[Description("A device that executes a sequence of actions with optional delays between actions")]
|
||||||
public class ActionSequence : EssentialsDevice
|
public class ActionSequence : EssentialsDevice
|
||||||
{
|
{
|
||||||
private ActionSequencePropertiesConfig _propertiesConfig;
|
private ActionSequencePropertiesConfig _propertiesConfig;
|
||||||
@@ -47,6 +47,12 @@ namespace PepperDash.Essentials.Core.Utilities
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void StartSequence()
|
public void StartSequence()
|
||||||
{
|
{
|
||||||
|
if (_worker.ThreadState == Thread.eThreadStates.ThreadRunning)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "Thread already running. Cannot Start Sequence");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Debug.Console(1, this, "Starting Action Sequence");
|
Debug.Console(1, this, "Starting Action Sequence");
|
||||||
_allowActionsToExecute = true;
|
_allowActionsToExecute = true;
|
||||||
AddActionsToQueue();
|
AddActionsToQueue();
|
||||||
|
|||||||
Reference in New Issue
Block a user