Skip to content

Commit 76465e4

Browse files
committed
Implement CanProtocol for IscanBus
1 parent 55e349a commit 76465e4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

can/interfaces/iscan.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"""
44

55
import ctypes
6-
import time
76
import logging
7+
import time
88
from typing import Optional, Tuple, Union
99

10-
from can import BusABC, Message
1110
from can import (
11+
BusABC,
12+
Message,
13+
CanProtocol,
1214
CanError,
1315
CanInterfaceNotImplementedError,
1416
CanInitializationError,
@@ -106,7 +108,11 @@ def __init__(
106108
iscan.isCAN_DeviceInitEx(self.channel, self.BAUDRATES[bitrate])
107109

108110
super().__init__(
109-
channel=channel, bitrate=bitrate, poll_interval=poll_interval, **kwargs
111+
channel=channel,
112+
bitrate=bitrate,
113+
poll_interval=poll_interval,
114+
protocol=CanProtocol.CAN_20,
115+
**kwargs,
110116
)
111117

112118
def _recv_internal(

0 commit comments

Comments
 (0)