Skip to content

Commit 20b3138

Browse files
jacobian91Jacob Erickson
andauthored
Pass flags instead of flags_t type for USB2CAN (#1252)
* Pass flags instead of flags_t type for USB2CAN * Remove usb2can unused open arguments for super Co-authored-by: Jacob Erickson <[email protected]>
1 parent 1142299 commit 20b3138

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

can/interfaces/usb2can/usb2canInterface.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from can import BusABC, Message, CanInitializationError, CanOperationError
1010
from .usb2canabstractionlayer import Usb2CanAbstractionLayer, CanalMsg, CanalError
1111
from .usb2canabstractionlayer import (
12-
flags_t,
1312
IS_ERROR_FRAME,
1413
IS_REMOTE_FRAME,
1514
IS_ID_TYPE,
@@ -95,7 +94,7 @@ def __init__(
9594
channel=None,
9695
dll="usb2can.dll",
9796
flags=0x00000008,
98-
*args,
97+
*_,
9998
bitrate=500000,
10099
**kwargs,
101100
):
@@ -118,11 +117,9 @@ def __init__(
118117
self.channel_info = f"USB2CAN device {device_id}"
119118

120119
connector = f"{device_id}; {baudrate}"
121-
self.handle = self.can.open(connector, flags_t)
120+
self.handle = self.can.open(connector, flags)
122121

123-
super().__init__(
124-
channel=channel, dll=dll, flags_t=flags_t, bitrate=bitrate, *args, **kwargs
125-
)
122+
super().__init__(channel=channel, **kwargs)
126123

127124
def send(self, msg, timeout=None):
128125
tx = message_convert_tx(msg)

0 commit comments

Comments
 (0)