-
Notifications
You must be signed in to change notification settings - Fork 659
Add BitTiming class compatibility to Vector interface #650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… vector-bit-timing # Conflicts: # can/interfaces/vector/canlib.py # can/interfaces/vector/vxlapi.py
Codecov Report
@@ Coverage Diff @@
## develop #650 +/- ##
===========================================
+ Coverage 68.57% 68.93% +0.36%
===========================================
Files 69 69
Lines 6227 6261 +34
===========================================
+ Hits 4270 4316 +46
+ Misses 1957 1945 -12 |
can/interfaces/vector/canlib.py
Outdated
| self.canFdConf = xlclass.XLcanFdConf() | ||
| if bitrate: | ||
| self.canFdConf.arbitrationBitRate = ctypes.c_uint(bitrate) | ||
| if timing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we refactor this out of the init and get back the canFdConf object? That should make the code more readible and make testing the corner cases a bit easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hardbyte can you take another look? I implemented the changes you requested.
Implementation based on #625
BitTiming class takes precedence over the bitrate argument.
I did not remove the other bit timing arguments from init() and i did not add any deprecation warnings.
i tested this on a VN1610