Skip to content

Commit ea71b67

Browse files
committed
Log HidDevice write/read data in hex
1 parent 9c55472 commit ea71b67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/TTController.Service/Hardware/HidDeviceProxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public bool WriteBytes(params byte[] bytes)
2929
var data = new byte[_device.Capabilities.OutputReportByteLength];
3030
Array.Copy(bytes, 0, data, 1, Math.Min(bytes.Length, _device.Capabilities.OutputReportByteLength - 1));
3131

32-
Logger.Trace("W[{vid}, {pid}] {data}", _device.Attributes.VendorId, _device.Attributes.ProductId, data);
32+
Logger.Trace("W[{vid}, {pid}] {data:X2}", _device.Attributes.VendorId, _device.Attributes.ProductId, data);
3333

3434
return _device.Write(data, 1000);
3535
}
@@ -45,7 +45,7 @@ public byte[] ReadBytes()
4545
return null;
4646
}
4747

48-
Logger.Trace("R[{vid}, {pid}] {data}", _device.Attributes.VendorId, _device.Attributes.ProductId, data.Data);
48+
Logger.Trace("R[{vid}, {pid}] {data:X2}", _device.Attributes.VendorId, _device.Attributes.ProductId, data.Data);
4949

5050
return data.Data;
5151
}

0 commit comments

Comments
 (0)