Skip to content

vector xlclass - implement XLbusParams #718

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

Merged
merged 5 commits into from
Nov 12, 2019

Conversation

zariiii9003
Copy link
Collaborator

This enables the user to read the currently active channel properties from the driver.

Example:

from can.interfaces.vector import xlclass
from can.interfaces.vector.canlib import get_channel_configs

configs = get_channel_configs()
channel_1: xlclass.XLchannelConfig = configs[0]
print(
    f"bitRate: {channel_1.busParams.data.can.bitRate},\n"
    f"sjw: {channel_1.busParams.data.can.sjw},\n"
    f"tseg1: {channel_1.busParams.data.can.tseg1},\n"
    f"tseg2: {channel_1.busParams.data.can.tseg2}"
)

Output:

bitRate: 500000,
sjw: 1,
tseg1: 4,
tseg2: 3

@codecov
Copy link

codecov bot commented Oct 25, 2019

Codecov Report

Merging #718 into develop will decrease coverage by 0.26%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop     #718      +/-   ##
===========================================
- Coverage     68.4%   68.13%   -0.27%     
===========================================
  Files           69       69              
  Lines         6210     6111      -99     
===========================================
- Hits          4248     4164      -84     
+ Misses        1962     1947      -15

@christiansandberg christiansandberg self-assigned this Nov 12, 2019
@christiansandberg christiansandberg added this to the 4.0 Release milestone Nov 12, 2019
@christiansandberg christiansandberg merged commit ac84454 into hardbyte:develop Nov 12, 2019
@zariiii9003 zariiii9003 deleted the vector-XLbusParams branch November 21, 2019 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants