Skip to content

Commit

Permalink
Fix Port Type changing not set the correct Universe
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-dmxc committed May 11, 2024
1 parent 61c6899 commit 37f4d04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ArtNetSharp/ArtNetSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0;net8.0</TargetFrameworks>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Version>0.0.22</Version>
<Version>0.0.23</Version>
<RepositoryUrl>https://github.com/DMXControl/ArtNetSharp</RepositoryUrl>
<PackageProjectUrl>$(RepositoryUrl)</PackageProjectUrl>
<PackageTags>RDM; ArtNet; E1.20; E1.33; E1.37-1; E1.37-2; E1.37-7</PackageTags>
Expand Down
2 changes: 2 additions & 0 deletions ArtNetSharp/Communication/AbstractInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
using System.Diagnostics;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System.Timers;

[assembly: InternalsVisibleTo("ArtNetTests")]
namespace ArtNetSharp.Communication
{
public abstract class AbstractInstance : IInstance
Expand Down
10 changes: 6 additions & 4 deletions ArtNetSharp/Communication/PortConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class PortConfig
public virtual byte PortNumber { get; set; }
public readonly byte BindIndex;

public virtual bool Output { get; set; }
public virtual bool Input { get; set; }
public virtual bool Output { get => this.Type.HasFlag(EPortType.OutputFromArtNet); }
public virtual bool Input { get => this.Type.HasFlag(EPortType.InputToArtNet); }
public virtual EPortType Type { get; set; }
public virtual EGoodInput GoodInput { get; set; }
public virtual EGoodOutput GoodOutput { get; set; }
Expand Down Expand Up @@ -63,8 +63,10 @@ public PortConfig(in byte bindIndex, in PortAddress portAddress, in bool output,

BindIndex = bindIndex;
PortAddress = portAddress;
Output = output;
Input = input;
if (output)
this.Type |= EPortType.OutputFromArtNet;
if (input)
this.Type |= EPortType.InputToArtNet;

additionalIPEndpoints = new List<IPv4Address>();
AdditionalIPEndpoints = additionalIPEndpoints.AsReadOnly();
Expand Down

0 comments on commit 37f4d04

Please sign in to comment.