io commander

This commit is contained in:
meelstorm
2025-07-19 15:57:59 +02:00
parent 40d74d6da6
commit cd70088d9a
46 changed files with 2198 additions and 28 deletions

View File

@@ -5,9 +5,14 @@ namespace Hawkeye.VisionBuilder.Workflow;
public class Context
{
public Context()
{
}
public HawkeyeImage? ActiveImage { get; set; }
public HawkeyeImage? LastCameraImage { get; set; }
public List<IGraphicsElement> GraphicsElements { get; set; }=new List<IGraphicsElement>();
public Dictionary<string, HawkeyeImage> Memory { get; set; } = new Dictionary<string, HawkeyeImage>();
public CancellationToken CancellationToken { get; set; }
}

View File

@@ -26,7 +26,7 @@ public class GetImageOperation:BaseOperation,IHaveImage
protected override void InterpretInternal(Context context)
{
var image = _workflowList.ImageSource.GetImage(CancellationToken.None).Result;
var image = _workflowList.ImageSource.GetImage(context.CancellationToken).Result;

View File

@@ -32,6 +32,7 @@ public class WorkflowList
long total = 0;
foreach (BaseOperation operation in Operations)
{
if (Context.CancellationToken.IsCancellationRequested) break;
operation.Interpret(Context);
}
_executionCounter++;