File tree Expand file tree Collapse file tree 2 files changed +19
-21
lines changed
Expand file tree Collapse file tree 2 files changed +19
-21
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ def __init__(
6363 serial = None ,
6464 fd = False ,
6565 data_bitrate = None ,
66- sjwAbr = 2 ,
67- tseg1Abr = 6 ,
68- tseg2Abr = 3 ,
69- sjwDbr = 2 ,
70- tseg1Dbr = 6 ,
71- tseg2Dbr = 3 ,
66+ sjw_abr = 2 ,
67+ tseg1_abr = 6 ,
68+ tseg2_abr = 3 ,
69+ sjw_dbr = 2 ,
70+ tseg1_dbr = 6 ,
71+ tseg2_dbr = 3 ,
7272 ** kwargs ,
7373 ):
7474 """
@@ -219,16 +219,16 @@ def __init__(
219219 self .canFdConf .arbitrationBitRate = ctypes .c_uint (bitrate )
220220 else :
221221 self .canFdConf .arbitrationBitRate = ctypes .c_uint (500000 )
222- self .canFdConf .sjwAbr = ctypes .c_uint (sjwAbr )
223- self .canFdConf .tseg1Abr = ctypes .c_uint (tseg1Abr )
224- self .canFdConf .tseg2Abr = ctypes .c_uint (tseg2Abr )
222+ self .canFdConf .sjwAbr = ctypes .c_uint (sjw_abr )
223+ self .canFdConf .tseg1Abr = ctypes .c_uint (tseg1_abr )
224+ self .canFdConf .tseg2Abr = ctypes .c_uint (tseg2_abr )
225225 if data_bitrate :
226226 self .canFdConf .dataBitRate = ctypes .c_uint (data_bitrate )
227227 else :
228228 self .canFdConf .dataBitRate = self .canFdConf .arbitrationBitRate
229- self .canFdConf .sjwDbr = ctypes .c_uint (sjwDbr )
230- self .canFdConf .tseg1Dbr = ctypes .c_uint (tseg1Dbr )
231- self .canFdConf .tseg2Dbr = ctypes .c_uint (tseg2Dbr )
229+ self .canFdConf .sjwDbr = ctypes .c_uint (sjw_dbr )
230+ self .canFdConf .tseg1Dbr = ctypes .c_uint (tseg1_dbr )
231+ self .canFdConf .tseg2Dbr = ctypes .c_uint (tseg2_dbr )
232232
233233 xldriver .xlCanFdSetConfiguration (
234234 self .port_handle , self .mask , self .canFdConf
Original file line number Diff line number Diff line change 66"""
77
88import ctypes
9- import pickle
10- import time
11- import logging
129import os
10+ import pickle
1311import unittest
1412from unittest .mock import Mock
1513
@@ -131,12 +129,12 @@ def test_bus_creation_fd_bitrate_timings(self) -> None:
131129 fd = True ,
132130 bitrate = 500000 ,
133131 data_bitrate = 2000000 ,
134- sjwAbr = 10 ,
135- tseg1Abr = 11 ,
136- tseg2Abr = 12 ,
137- sjwDbr = 13 ,
138- tseg1Dbr = 14 ,
139- tseg2Dbr = 15 ,
132+ sjw_abr = 10 ,
133+ tseg1_abr = 11 ,
134+ tseg2_abr = 12 ,
135+ sjw_dbr = 13 ,
136+ tseg1_dbr = 14 ,
137+ tseg2_dbr = 15 ,
140138 _testing = True ,
141139 )
142140 self .assertIsInstance (self .bus , canlib .VectorBus )
You can’t perform that action at this time.
0 commit comments