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 33import select
44import socket
55import 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
612
713try :
814 from fcntl import ioctl
915except ModuleNotFoundError : # Missing on Windows
1016 pass
1117
12- from typing import List , Optional , Tuple , Union
1318
1419log = logging .getLogger (__name__ )
1520
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-
2221
2322# see socket.getaddrinfo()
2423IPv4_ADDRESS_INFO = Tuple [str , int ] # address, port
@@ -103,7 +102,9 @@ def __init__(
103102 "receiving own messages is not yet implemented"
104103 )
105104
106- super ().__init__ (channel , ** kwargs )
105+ super ().__init__ (
106+ channel , ** kwargs , protocol = CANProtocol .CAN_FD if fd else CANProtocol .CAN_20
107+ )
107108
108109 self .is_fd = fd
109110 self ._multicast = GeneralPurposeUdpMulticastBus (channel , port , hop_limit )
You can’t perform that action at this time.
0 commit comments