hardbyte / hardbyte/python-can

Using kvaser revealed issues with connect.

オープン
#2,015 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
1.6k
フォーク
697
PR マージ指標
30日以内にマージされた PR はありません

説明

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,
# )

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。