recipe name filter

This commit is contained in:
meelstorm
2025-07-28 09:52:29 +02:00
parent 71d59df0cd
commit f80b275ad8
58 changed files with 4066 additions and 79 deletions

View File

@@ -4,4 +4,6 @@ public enum EGPIOCommand
{
Start,
Stop,
Pause,
Resume,
}

View File

@@ -1,6 +1,7 @@
using Ninject.Extensions.ChildKernel;
using Ninject;
using Ninject.Extensions.ChildKernel;
using System.ComponentModel;
using Ninject;
using System.Reflection;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.IOCommander.Interfaces;
using VisionBuilder.UI.IOCommander.Modules;
@@ -14,7 +15,6 @@ public static class ModuleExtensions
{
// for settings to work properly
TypeDescriptor.AddAttributes(typeof(List<IOCommanderPinAction>), new TypeConverterAttribute(typeof(IOCommanderPinActionListConverter)));
TypeDescriptor.AddAttributes(typeof(List<IOCommanderCommand>), new TypeConverterAttribute(typeof(IOCommanderCommandListConverter)));
List<IOCommanderCameraSettings> cameras = cameraNames.Select(name => new IOCommanderCameraSettings(name)).ToList();

View File

@@ -49,6 +49,19 @@ public class IOCommanderCameraModule: IVisionBuilderModule
_cameraVm.StopCommand.Execute(null);
}
break;
case EGPIOCommand.Pause:
if(_cameraVm.PauseCommand.CanExecute(null))
{
_cameraVm.PauseCommand.Execute(null);
}
break;
case EGPIOCommand.Resume:
if(_cameraVm.ResumeCommand.CanExecute(null))
{
_cameraVm.ResumeCommand.Execute(null);
}
break;
default:
throw new ArgumentOutOfRangeException(nameof(command), command, null);
}

View File

@@ -1,4 +1,5 @@
using System.Collections.Concurrent;
using Serilog;
using VisionBuilder.UI.Common;
using VisionBuilder.UI.Common.Commands;
using VisionBuilder.UI.Common.RecipeProcessing;
@@ -25,8 +26,17 @@ public class IOCommanderModule:IVisionBuilderModule
public void InitializeModule()
{
_ioCommander = _factory.Create();
_ioCommander.OnPinChanged += OnPinChanged;
try
{
_ioCommander = _factory.Create();
_ioCommander.OnPinChanged += OnPinChanged;
}
catch (Exception e)
{
Log.Warning("IOCommander did non load: {e}",e);
_ioCommander= null;
}
if (_settings.ShowDebugView)_debugViewService.ShowDebugView();