mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-30 21:04:48 +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>
|
||||
/// A device that executes a sequence of actions with optional delays between actions
|
||||
/// </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
|
||||
{
|
||||
private ActionSequencePropertiesConfig _propertiesConfig;
|
||||
@@ -47,6 +47,12 @@ namespace PepperDash.Essentials.Core.Utilities
|
||||
/// </summary>
|
||||
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");
|
||||
_allowActionsToExecute = true;
|
||||
AddActionsToQueue();
|
||||
|
||||
Reference in New Issue
Block a user