File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 1+ import logging
12from typing import Optional , Tuple
23
4+ import usb
5+ from gs_usb .constants import CAN_ERR_FLAG , CAN_RTR_FLAG , CAN_EFF_FLAG , CAN_MAX_DLC
36from gs_usb .gs_usb import GsUsb
47from gs_usb .gs_usb_frame import GsUsbFrame , GS_USB_NONE_ECHO_ID
5- from gs_usb .constants import CAN_ERR_FLAG , CAN_RTR_FLAG , CAN_EFF_FLAG , CAN_MAX_DLC
6- import can
7- import usb
8- import logging
98
9+ import can
1010from ..exceptions import CanInitializationError , CanOperationError
1111
12-
1312logger = logging .getLogger (__name__ )
1413
1514
@@ -56,7 +55,12 @@ def __init__(
5655 self .gs_usb .set_bitrate (bitrate )
5756 self .gs_usb .start ()
5857
59- super ().__init__ (channel = channel , can_filters = can_filters , ** kwargs )
58+ super ().__init__ (
59+ channel = channel ,
60+ can_filters = can_filters ,
61+ protocol = can .CanProtocol .CAN_20 ,
62+ ** kwargs ,
63+ )
6064
6165 def send (self , msg : can .Message , timeout : Optional [float ] = None ):
6266 """Transmit a message to the CAN bus.
You can’t perform that action at this time.
0 commit comments