Skip to content

Commit 1252c58

Browse files
committed
fix issue with command length handling
1 parent d3b808b commit 1252c58

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

FXCommands/ConnectionManager.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ public void SendMessage(string message, bool canRetry = true)
2020
int port = 29200; // fx console
2121

2222
byte[] b_header = "43:4d:4e:44".Split(':').Select(s => byte.Parse(s, System.Globalization.NumberStyles.HexNumber)).ToArray(); // CMND
23-
byte[] b_nog = "00:d2:00:00:00".Split(':').Select(s => byte.Parse(s, System.Globalization.NumberStyles.HexNumber)).ToArray(); // 0x00d20000
23+
byte[] b_nog = "00:d2:00:00".Split(':').Select(s => byte.Parse(s, System.Globalization.NumberStyles.HexNumber)).ToArray(); // 0x00d20000
2424
byte[] b_command = Encoding.ASCII.GetBytes(message);
2525
byte[] b_padding = {
26-
00,
27-
00
28-
};
29-
byte[] b_length = BitConverter.GetBytes(message.Length + 12 + 1);
26+
00,
27+
00
28+
};
29+
byte[] b_length = BitConverter.GetBytes((message.Length + 12 + 1));
3030
byte[] b_terminator = {
31-
00
32-
};
31+
00
32+
};
3333

3434
Array.Reverse(b_length); // flip flop
3535

0 commit comments

Comments
 (0)