|
|
|
|
@ -99,10 +99,12 @@ public class UsbHidProtocol : CommunicationProtocol |
|
|
|
|
// any data received? |
|
|
|
|
if (readData.Length > 0) |
|
|
|
|
{ |
|
|
|
|
foreach (var readByte in readData) |
|
|
|
|
var dataArray = readData.ToArray(); |
|
|
|
|
var payloadLength = dataArray[1]; |
|
|
|
|
for (int i = 2; i < (payloadLength + 2); i++) |
|
|
|
|
{ |
|
|
|
|
// report new byte with event |
|
|
|
|
this.OnReceivedData(new ExtendedByte((byte)readByte)); |
|
|
|
|
this.OnReceivedData(new ExtendedByte(dataArray[i])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|