1.0.4
This commit is contained in:
@@ -51,7 +51,7 @@ public class IOCommander : IIOCommander
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
if (arrcurrentPinsState[i] != arrreadState[i])
|
||||
OnPinChanged(i, arrreadState[i]);
|
||||
OnPinChanged(i+1, arrreadState[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,7 @@ public class IOCommander : IIOCommander
|
||||
|
||||
public void SetPins(int pin, bool state)
|
||||
{
|
||||
pin -= 1;
|
||||
lock (this)
|
||||
{
|
||||
//Log.Logger.ForContext<IOCommander>().Verbose("Setting pin {pin} to {state}", pin, state);
|
||||
|
||||
@@ -4,12 +4,12 @@ using VisionBuilder.UI.Common;
|
||||
|
||||
namespace VisionBuilder.UI.IOCommander.Settings;
|
||||
|
||||
public class IOCommanderSettings: ISettings
|
||||
public class IOCommanderSettings : ISettings
|
||||
{
|
||||
public IOCommanderCameraSettings[] Cameras { get; }
|
||||
public int PulseLength { get; set; } = 100;
|
||||
public bool ShowDebugView { get; set; } = false;
|
||||
public string Port { get; set; }="COM3";
|
||||
public string Port { get; set; } = "COM3";
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public List<IOCommanderProcessingEvent> GlobalEvents { get; set; } =
|
||||
@@ -28,10 +28,12 @@ public class IOCommanderSettings: ISettings
|
||||
settings.RegisterSimple(this, () => Port, "IOCommander", nameof(Port));
|
||||
settings.RegisterSimple(this, () => PulseLength, "IOCommander", nameof(PulseLength));
|
||||
settings.RegisterSimple(this, () => ShowDebugView, "IOCommander", nameof(ShowDebugView));
|
||||
|
||||
settings.RegisterSimple(this, () => Enabled, "IOCommander", nameof(Enabled));
|
||||
|
||||
foreach (IOCommanderProcessingEvent @event in GlobalEvents)
|
||||
{
|
||||
settings.RegisterSimple(@event, () => @event.Actions, "IOCommander/Global outputs/" + @event.Event.ToString(), nameof(@event.Actions));
|
||||
settings.RegisterSimple(@event, () => @event.Actions,
|
||||
"IOCommander/Global outputs/" + @event.Event.ToString(), nameof(@event.Actions));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user