From 425377a0fef51b9c0294957d0ec03f5a85433545 Mon Sep 17 00:00:00 2001 From: Timothy Edison Date: Thu, 8 Sep 2022 15:57:40 +0200 Subject: [PATCH] [fix] EFF index increment for correct data RX --- pyusbtin/canmessage.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyusbtin/canmessage.py b/pyusbtin/canmessage.py index dc408ed..8446e88 100644 --- a/pyusbtin/canmessage.py +++ b/pyusbtin/canmessage.py @@ -347,9 +347,10 @@ def from_string(cls, msg): elif mtype == 'T': mid = int(msg[index: index + 8], 16) dlc = int(msg[index + 8], 16) - index = index + 8 + index += 1 + index += 8 for i in range(dlc): - data.append(int(msg[index: index +1], 16)) + data.append(int(msg[index: index +2], 16)) index += 2 return cls(mid, data=data, dlc=dlc, rtr=rtr) else: