File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
can/interfaces/udp_multicast Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 3
3
import select
4
4
import socket
5
5
import struct
6
+ from typing import List , Optional , Tuple , Union
7
+
8
+ import can
9
+ from can import BusABC , CANProtocol
10
+ from can .typechecking import AutoDetectedConfig
11
+ from .utils import pack_message , unpack_message , check_msgpack_installed
6
12
7
13
try :
8
14
from fcntl import ioctl
9
15
except ModuleNotFoundError : # Missing on Windows
10
16
pass
11
17
12
- from typing import List , Optional , Tuple , Union
13
18
14
19
log = logging .getLogger (__name__ )
15
20
16
- import can
17
- from can import BusABC
18
- from can .typechecking import AutoDetectedConfig
19
-
20
- from .utils import pack_message , unpack_message , check_msgpack_installed
21
-
22
21
23
22
# see socket.getaddrinfo()
24
23
IPv4_ADDRESS_INFO = Tuple [str , int ] # address, port
@@ -103,7 +102,9 @@ def __init__(
103
102
"receiving own messages is not yet implemented"
104
103
)
105
104
106
- super ().__init__ (channel , ** kwargs )
105
+ super ().__init__ (
106
+ channel , ** kwargs , protocol = CANProtocol .CAN_FD if fd else CANProtocol .CAN_20
107
+ )
107
108
108
109
self .is_fd = fd
109
110
self ._multicast = GeneralPurposeUdpMulticastBus (channel , port , hop_limit )
You can’t perform that action at this time.
0 commit comments