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
1
2
from typing import Optional , Tuple
2
3
4
+ import usb
5
+ from gs_usb .constants import CAN_ERR_FLAG , CAN_RTR_FLAG , CAN_EFF_FLAG , CAN_MAX_DLC
3
6
from gs_usb .gs_usb import GsUsb
4
7
from 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
9
8
9
+ import can
10
10
from ..exceptions import CanInitializationError , CanOperationError
11
11
12
-
13
12
logger = logging .getLogger (__name__ )
14
13
15
14
@@ -56,7 +55,12 @@ def __init__(
56
55
self .gs_usb .set_bitrate (bitrate )
57
56
self .gs_usb .start ()
58
57
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
+ )
60
64
61
65
def send (self , msg : can .Message , timeout : Optional [float ] = None ):
62
66
"""Transmit a message to the CAN bus.
You can’t perform that action at this time.
0 commit comments