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 33"""
44
55import io
6- import time
76import logging
7+ import time
88from typing import Optional
99
10- from can import BusABC , Message
10+ from can import BusABC , Message , CanProtocol
1111from ..exceptions import CanInterfaceNotImplementedError , CanOperationError
1212
1313logger = logging .getLogger (__name__ )
@@ -96,7 +96,7 @@ def __init__(
9696 )
9797 logger .info ("Using device: %s" , self .channel_info )
9898
99- super ().__init__ (channel = channel , ** kwargs )
99+ super ().__init__ (channel = channel , protocol = CanProtocol . CAN_20 , ** kwargs )
100100
101101 def set_bitrate (self , bitrate ):
102102 """
Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
33import unittest
4+
45import can
56
67
@@ -14,6 +15,9 @@ def setUp(self):
1415 def tearDown (self ):
1516 self .bus .shutdown ()
1617
18+ def test_protocol (self ):
19+ self .assertEqual (self .bus .protocol , can .CanProtocol .CAN_20 )
20+
1721 def test_recv_extended (self ):
1822 self .serial .write (
1923 bytearray (
You can’t perform that action at this time.
0 commit comments