Skip to content

Commit 6e0802b

Browse files
committed
Fix Typos
1 parent c92314a commit 6e0802b

4 files changed

Lines changed: 19 additions & 15 deletions

File tree

ArtNetSharp/Communication/AbstractInstance.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,10 @@ private async Task sendArtPollReply(IPv4Address ownIp, IPv4Address destinationIp
467467

468468
Task task = Task.Run(async () =>
469469
{
470+
var goodInput = portConfig.GoodInput;
471+
if (portConfig.Input)
472+
if (sendDMXBuffer.ContainsKey(portConfig.PortAddress))
473+
goodInput = new GoodInput((byte)(goodInput.Byte1 | 0b10000000));
470474
ArtPollReply reply = new ArtPollReply(ownIp,
471475
ownIp,
472476
ownMacAddress,
@@ -484,7 +488,7 @@ private async Task sendArtPollReply(IPv4Address ownIp, IPv4Address destinationIp
484488
ESTAManufacturerCode,
485489
nodeReport,
486490
portConfig.Type,
487-
portConfig.GoodInput,
491+
goodInput,
488492
portConfig.GoodOutput,
489493
style: EstCodes);
490494

ArtNetSharp/Misc/ObjectTypes/GoodInput.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ namespace ArtNetSharp
2121
/// </summary>
2222
public readonly bool InputDisabled;
2323
/// <summary>
24-
/// Channel includes DMX512 test packets.
24+
/// Channel includes DMX512 text packets.
2525
/// </summary>
26-
public readonly bool DMX_TestPacketsSupported;
26+
public readonly bool DMX_TextPacketsSupported;
2727
/// <summary>
2828
/// Channel includes DMX512 SIP’s.
2929
/// </summary>
3030
public readonly bool DMX_SIPsSupported;
3131
/// <summary>
3232
/// Channel includes DMX512 test packets.
3333
/// </summary>
34-
public readonly bool DMX_TestPacketsSupported2;
34+
public readonly bool DMX_TestPacketsSupported;
3535
/// <summary>
3636
/// Data received.
3737
/// </summary>
@@ -44,26 +44,26 @@ public GoodInput(in byte byte1)
4444
ConvertTo = (EConvertTo)(Byte1 & 0b00000001);
4545
ReceiveErrorsDetected = Tools.BitsMatch(Byte1, 0b00000100);
4646
InputDisabled = Tools.BitsMatch(Byte1, 0b00001000);
47-
DMX_TestPacketsSupported = Tools.BitsMatch(Byte1, 0b00010000);
47+
DMX_TextPacketsSupported = Tools.BitsMatch(Byte1, 0b00010000);
4848
DMX_SIPsSupported = Tools.BitsMatch(Byte1, 0b00100000);
49-
DMX_TestPacketsSupported2 = Tools.BitsMatch(Byte1, 0b01000000);
49+
DMX_TestPacketsSupported = Tools.BitsMatch(Byte1, 0b01000000);
5050
DataReceived = Tools.BitsMatch(Byte1, 0b10000000);
5151
}
5252

5353
public GoodInput(in EConvertTo convertTo = EConvertTo.ArtNet,
5454
in bool receiveErrorsDetected = false,
5555
in bool inputDisabled = false,
56-
in bool dMX_TestPacketsSupported = false,
56+
in bool dMX_TextPacketsSupported = false,
5757
in bool dMX_SIPsSupported = false,
58-
in bool dMX_TestPacketsSupported2 = false,
58+
in bool dMX_TestPacketsSupported = false,
5959
in bool dataReceived = false) : this()
6060
{
6161
ConvertTo = convertTo;
6262
ReceiveErrorsDetected = receiveErrorsDetected;
6363
InputDisabled = inputDisabled;
64-
DMX_TestPacketsSupported = dMX_TestPacketsSupported;
64+
DMX_TextPacketsSupported = dMX_TextPacketsSupported;
6565
DMX_SIPsSupported = dMX_SIPsSupported;
66-
DMX_TestPacketsSupported2 = dMX_TestPacketsSupported2;
66+
DMX_TestPacketsSupported = dMX_TestPacketsSupported;
6767
DataReceived = dataReceived;
6868

6969
Byte1 |= (byte)ConvertTo;
@@ -73,11 +73,11 @@ public GoodInput(in EConvertTo convertTo = EConvertTo.ArtNet,
7373
Byte1 |= 0b00000100;
7474
if (InputDisabled)
7575
Byte1 |= 0b00001000;
76-
if (DMX_TestPacketsSupported)
76+
if (DMX_TextPacketsSupported)
7777
Byte1 |= 0b00010000;
7878
if (DMX_SIPsSupported)
7979
Byte1 |= 0b00100000;
80-
if (DMX_TestPacketsSupported2)
80+
if (DMX_TestPacketsSupported)
8181
Byte1 |= 0b01000000;
8282
if (DataReceived)
8383
Byte1 |= 0b10000000;

ArtNetTests/ObjectTypesTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,9 @@ public void TestGoodInput()
435435
Assert.That(goodInput.ConvertTo, Is.EqualTo(result!.ConvertTo));
436436
Assert.That(goodInput.ReceiveErrorsDetected, Is.EqualTo(result!.ReceiveErrorsDetected));
437437
Assert.That(goodInput.InputDisabled, Is.EqualTo(result!.InputDisabled));
438-
Assert.That(goodInput.DMX_TestPacketsSupported, Is.EqualTo(result!.DMX_TestPacketsSupported));
438+
Assert.That(goodInput.DMX_TextPacketsSupported, Is.EqualTo(result!.DMX_TextPacketsSupported));
439439
Assert.That(goodInput.DMX_SIPsSupported, Is.EqualTo(result!.DMX_SIPsSupported));
440-
Assert.That(goodInput.DMX_TestPacketsSupported2, Is.EqualTo(result!.DMX_TestPacketsSupported2));
440+
Assert.That(goodInput.DMX_TestPacketsSupported, Is.EqualTo(result!.DMX_TestPacketsSupported));
441441
Assert.That(goodInput.DataReceived, Is.EqualTo(result!.DataReceived));
442442
Assert.That(goodInput.GetHashCode(), Is.EqualTo(result!.GetHashCode()));
443443
Assert.That(goodInput, Is.EqualTo(result));

ArtNetTests/PackagesSerializeDeserialize.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void ArtPollReply()
181181
doPortRelatedExceptionTests(1, _inputs: new object[] { new Universe(15), new Universe(3), new Universe(9), new Universe(5), new Universe(1) });
182182
doPortRelatedExceptionTests(1, _outputs: new object[] { new Universe(15), new Universe(3), new Universe(9), new Universe(5), new Universe(1) });
183183
doPortRelatedExceptionTests(2, portTypes: new EPortType[] { EPortType.ArtNet | EPortType.InputToArtNet, EPortType.MIDI, EPortType.MIDI, EPortType.MIDI, EPortType.MIDI });
184-
doPortRelatedExceptionTests(2, goodInputs: new GoodInput[] { new GoodInput(), new GoodInput(receiveErrorsDetected: true), new GoodInput(dMX_TestPacketsSupported: true), new GoodInput(dMX_TestPacketsSupported: true), new GoodInput(dMX_TestPacketsSupported: true), new GoodInput(dMX_TestPacketsSupported: true) });
184+
doPortRelatedExceptionTests(2, goodInputs: new GoodInput[] { new GoodInput(), new GoodInput(receiveErrorsDetected: true), new GoodInput(dMX_TextPacketsSupported: true), new GoodInput(dMX_TextPacketsSupported: true), new GoodInput(dMX_TextPacketsSupported: true), new GoodInput(dMX_TextPacketsSupported: true) });
185185
doPortRelatedExceptionTests(2, goodOutputs: new GoodOutput[] { new GoodOutput(), new GoodOutput(dmx_OutputShortCircuit: true), new GoodOutput(dmx_OutputShortCircuit: true), new GoodOutput(dmx_OutputShortCircuit: true), new GoodOutput(dmx_OutputShortCircuit: true) });
186186

187187
void doPortRelatedExceptionTests(

0 commit comments

Comments
 (0)