Skip to content

vector xlclass - implement XLbusParams - #718

Merged
christiansandberg merged 5 commits into
hardbyte:developfrom
zariiii9003:vector-XLbusParams
Nov 12, 2019
Merged

vector xlclass - implement XLbusParams#718
christiansandberg merged 5 commits into
hardbyte:developfrom
zariiii9003:vector-XLbusParams

Conversation

@zariiii9003

Copy link
Copy Markdown
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

codecov Bot commented Oct 25, 2019

Copy link
Copy Markdown

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