File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 3
3
"""
4
4
5
5
import io
6
- import time
7
6
import logging
7
+ import time
8
8
from typing import Optional
9
9
10
- from can import BusABC , Message
10
+ from can import BusABC , Message , CanProtocol
11
11
from ..exceptions import CanInterfaceNotImplementedError , CanOperationError
12
12
13
13
logger = logging .getLogger (__name__ )
@@ -96,7 +96,7 @@ def __init__(
96
96
)
97
97
logger .info ("Using device: %s" , self .channel_info )
98
98
99
- super ().__init__ (channel = channel , ** kwargs )
99
+ super ().__init__ (channel = channel , protocol = CanProtocol . CAN_20 , ** kwargs )
100
100
101
101
def set_bitrate (self , bitrate ):
102
102
"""
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env python
2
2
3
3
import unittest
4
+
4
5
import can
5
6
6
7
@@ -14,6 +15,9 @@ def setUp(self):
14
15
def tearDown (self ):
15
16
self .bus .shutdown ()
16
17
18
+ def test_protocol (self ):
19
+ self .assertEqual (self .bus .protocol , can .CanProtocol .CAN_20 )
20
+
17
21
def test_recv_extended (self ):
18
22
self .serial .write (
19
23
bytearray (
You can’t perform that action at this time.
0 commit comments