diff --git a/ebpfcat/ethercat.py b/ebpfcat/ethercat.py index 30eef3f692ef917807871340e1c19a8bc02b8841..ffcfc27716258c2553c1bd3d2bef4a678b59f0da 100644 --- a/ebpfcat/ethercat.py +++ b/ebpfcat/ethercat.py @@ -966,8 +966,11 @@ class Terminal: oe.valueInfo, dataType, oe.bitLength, oe.objectAccess = \ unpack_from("<BxHHH", data) assert subidx == oe.valueInfo + oe.dataTypeOriginal = dataType if dataType < 2048: oe.dataType = ECDataType(dataType) + elif oe.bitLength == 8: + oe.dataType = ECDataType.UNSIGNED8 else: oe.dataType = dataType oe.name = data[8:].decode("utf8")