Skip to content

Commit a602f03

Browse files
committed
add example .asc file
fix (new) bug with asc-file
1 parent c03c748 commit a602f03

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

can/io/asc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def extractCanId(strCanId):
5050

5151
dlc = int(dlc)
5252
frame = bytearray()
53-
for byte in data.split():
53+
data = data.split()
54+
for byte in data[0:dlc]:
5455
frame.append(int(byte,16))
5556
msg = Message(timestamp=time,
5657
arbitration_id=extractCanId(canId)[0] & CAN_ID_MASK,

test/data/logfile.asc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
date Sam Sep 30 15:06:13.191 2017
2+
base hex timestamps absolute
3+
internal events logged
4+
// version 9.0.0
5+
Begin Triggerblock Sam Sep 30 15:06:13.191 2017
6+
0.000000 Start of measurement
7+
0.015991 CAN 1 Status:chip status error passive - TxErr: 132 RxErr: 0
8+
0.015991 CAN 2 Status:chip status error active
9+
1.015991 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00%
10+
1.015991 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00%
11+
2.015992 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00%
12+
17.876707 CAN 1 Status:chip status error passive - TxErr: 131 RxErr: 0
13+
17.876708 1 6F9 Rx d 8 05 0C 00 00 00 00 00 00 Length = 240015 BitCount = 124 ID = 1785
14+
17.876976 1 6F8 Rx d 8 FF 00 0C FE 00 00 00 00 Length = 239910 BitCount = 124 ID = 1784
15+
18.015997 1 Statistic: D 2 R 0 XD 0 XR 0 E 0 O 0 B 0.04%
16+
113.016026 1 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00%
17+
113.016026 2 Statistic: D 0 R 0 XD 0 XR 0 E 0 O 0 B 0.00%
18+
End TriggerBlock

0 commit comments

Comments
 (0)