Skip to content

Commit 2e24af0

Browse files
Fix vector get application config (#977)
* fixes #732: add support for VN8900 xlGetChannelTime function * add another level of try/except according to the review * format using black * the application channels needs to be provided as a ctypes variable * fix mock in test_vector.py Co-authored-by: zariiii9003 <[email protected]>
1 parent c959047 commit 2e24af0

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

can/interfaces/vector/canlib.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ def get_application_config(
688688
hw_type = ctypes.c_uint()
689689
hw_index = ctypes.c_uint()
690690
hw_channel = ctypes.c_uint()
691+
app_channel = ctypes.c_uint(app_channel)
691692

692693
xldriver.xlGetApplConfig(
693694
app_name.encode(),

test/test_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def xlGetApplConfig(
356356
bus_type: ctypes.c_uint,
357357
) -> int:
358358
hw_type.value = 1
359-
hw_channel.value = app_channel
359+
hw_channel.value = 0
360360
return 0
361361

362362

0 commit comments

Comments
 (0)