hardbyte / hardbyte/python-can

Using kvaser revealed issues with connect.

Đang mở
#2,015 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
1.6k
Fork
697
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

bus = can.interface.Bus(interface='kvaser', channel=0, bitrate=500000)
when run this report error

File "\Lib\site-packages\can\interfaces\kvaser\canlib.py", line 563, in __init__
canIoCtlInit(
~~~~~~~~~~~~^
^^^^^^^^^^^^^^^^^^
...<2 lines>...
1,
^^
)
^
File "\Lib\site-packages\can\interfaces\kvaser\canlib.py", line 102, in __check_status_operation
raise CANLIBOperationError(function, result, arguments)
can.interfaces.kvaser.canlib.CANLIBOperationError: Function canIoCtl failed - Error in parameter [Error Code -1]

examining the original files of canlib, there is no longer a definition for canIOCTL_SET_LOCAL_TXACK.

so I commented out the following code, and it works fine now.

# enable canMSG_LOCAL_TXACK flag in received messages

# canIoCtlInit(
# self._read_handle,
# canstat.canIOCTL_SET_LOCAL_TXACK,
# ctypes.byref(ctypes.c_byte(local_echo)),
# 1,
# )

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.