From 43c6c00bc1769d4242931212ec7881ab7e80111f Mon Sep 17 00:00:00 2001 From: Patrick Grote Date: Wed, 28 Feb 2024 16:31:48 +0100 Subject: [PATCH] anotherf fix --- Examples/ControllerExample/Program.cs | 4 ++-- Examples/NodeInputExample/Program.cs | 8 ++++---- Examples/NodeOutputExample/Program.cs | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Examples/ControllerExample/Program.cs b/Examples/ControllerExample/Program.cs index 9da648c..938fe73 100644 --- a/Examples/ControllerExample/Program.cs +++ b/Examples/ControllerExample/Program.cs @@ -16,8 +16,8 @@ controllerInstance.Name = controllerInstance.ShortName = "Controller Example"; // Configure Ports -for (ushort i = 0; i < 32; i++) - controllerInstance.AddPortConfig(new PortConfig(i, false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet}); +for (byte i = 1; i <= 32; i++) + controllerInstance.AddPortConfig(new PortConfig(i,new PortAddress (i), false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet}); // Add Instance ArtNet.Instance.AddInstance(controllerInstance); diff --git a/Examples/NodeInputExample/Program.cs b/Examples/NodeInputExample/Program.cs index 068d83c..06ceaf4 100644 --- a/Examples/NodeInputExample/Program.cs +++ b/Examples/NodeInputExample/Program.cs @@ -16,11 +16,11 @@ nodeInstance.Name = nodeInstance.ShortName = "Node Input Example"; // Configure Input Ports -for (ushort i = 0; i < 4; i++) - nodeInstance.AddPortConfig(new PortConfig(i, false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet }); +for (byte i = 1; i <= 4; i++) + nodeInstance.AddPortConfig(new PortConfig(i, new PortAddress(i), false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet }); -for (ushort i = 10; i < 14; i++) - nodeInstance.AddPortConfig(new PortConfig(i, false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet }); +for (byte i = 11; i <= 14; i++) + nodeInstance.AddPortConfig(new PortConfig(i, new PortAddress(i), false, true) { PortNumber = (byte)i, Type = EPortType.InputToArtNet | EPortType.ArtNet }); // Add Instance ArtNet.Instance.AddInstance(nodeInstance); diff --git a/Examples/NodeOutputExample/Program.cs b/Examples/NodeOutputExample/Program.cs index 4e75340..286db53 100644 --- a/Examples/NodeOutputExample/Program.cs +++ b/Examples/NodeOutputExample/Program.cs @@ -16,8 +16,8 @@ nodeInstance.Name = nodeInstance.ShortName = "Node Output Example"; // Configure Output Ports -for (ushort i = 0; i < 32; i++) - nodeInstance.AddPortConfig(new PortConfig(i, true, false) { PortNumber = (byte)i, Type = EPortType.OutputFromArtNet, GoodOutput = EGoodOutput.ContiniuousOutput | EGoodOutput.DataTransmitted }); +for (byte i = 1; i <= 32; i++) + nodeInstance.AddPortConfig(new PortConfig(i, new PortAddress(i), true, false) { PortNumber = (byte)i, Type = EPortType.OutputFromArtNet, GoodOutput = EGoodOutput.ContiniuousOutput | EGoodOutput.DataTransmitted }); // Listen for new Data nodeInstance.DMXReceived += (sender, e) =>