IDS camera added
This commit is contained in:
@@ -10,7 +10,6 @@ public class IOCommander : IIOCommander
|
||||
SerialPort _port;
|
||||
public IOCommander(string COMPort)
|
||||
{
|
||||
|
||||
_port = new SerialPort(COMPort);
|
||||
_port.BaudRate = 57600;
|
||||
_port.ReadTimeout = 100;
|
||||
|
||||
@@ -28,7 +28,7 @@ public class IOCommanderCameraModule: IVisionBuilderModule
|
||||
_recognitionControl.ImageProcessed += _recognitionControl_ImageProcessed;
|
||||
_recognitionControl.SessionStarted += _recognitionControl_SessionStarted;
|
||||
_recognitionControl.SessionEnded += _recognitionControl_SessionEnded;
|
||||
mainModule.OnPinChangedEvent += MainModule_OnPinChangedEvent;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class IOCommanderCameraModule: IVisionBuilderModule
|
||||
|
||||
public void InitializeModule()
|
||||
{
|
||||
|
||||
_mainModule.OnPinChangedEvent += MainModule_OnPinChangedEvent;
|
||||
}
|
||||
|
||||
private void _recognitionControl_SessionEnded(SessionEndedEvent obj)
|
||||
|
||||
@@ -33,15 +33,12 @@ public class IOCommanderModule:IVisionBuilderModule
|
||||
|
||||
}
|
||||
ConcurrentDictionary<int, bool> _pinStates = new ConcurrentDictionary<int, bool>();
|
||||
public event Action<int, bool>? OnPinChangedEvent
|
||||
{
|
||||
add => _ioCommander!.OnPinChanged += value;
|
||||
remove => _ioCommander!.OnPinChanged -= value;
|
||||
}
|
||||
public event Action<int, bool>? OnPinChangedEvent = delegate { };
|
||||
private void OnPinChanged(int arg1, bool arg2)
|
||||
{
|
||||
_pinStates.TryAdd(arg1, arg2);
|
||||
_debugViewService.SetInputPinStatus(arg1, arg2);
|
||||
OnPinChangedEvent?.Invoke(arg1, arg2);
|
||||
}
|
||||
|
||||
public void SetOutput(int pin, bool value)
|
||||
|
||||
Reference in New Issue
Block a user