hardbyte / hardbyte/python-can

Unify bit timing parameters

Đang mở
#614 7 bình luận 2 reaction 1 người được giao Được @christiansandberg nhận Xem trên GitHub
api enhancement
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ả

I've had a quick look at the various interfaces and how you can specify custom bit timing parameters. They vary in abstraction. Some supports setting BTR registers directly, usually using some external tool for help. Some lets you specify SJW, TSEG1, TSEG2, SAM and then BRP is calculated from desired bitrate.

For CAN-FD you must specify different settings for arbitration phase and data phase.

Interfaces supporting BTR register:
* canalyst (named Timing0 and Timing1)
* slcan (named btr as hexadecimal string)
* pcan (possible, see #538)
* ixxat (possible)
* systec (possible)
* ...?

Interfaces supporting SJW, TSEG1, TSEG2, SAM:
* kvaser (named sjw, tseg1, tseg2, no_samp)
* vector

Interfaces supporting CAN-FD:
* kvaser (uses same sjw, tseg1, tseg2 for both arbitration and data)
* vector (sjwAbr, tseg1Abr, tseg2Abr and sjwDbr, tseg1Dbr, tseg2Dbr)
* pcan (f_clock, nom_brp, nom_tseg1, nom_tseg2, nom_sjw and data_brp, data_tseg1, data_tseg2, data_sjw)

As suggested by @bmeisels I propose to create a bit timing class which can bridge the different APIs and reduce clutter in the argument list. See #615 for implementation.

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.