threepp
C++20 기반 크로스플랫폼 3D 라이브러리, 파이썬 바인딩 및 three.js 수준 API 제공
아직 감지된 업데이트가 없습니다. GitHub 릴리스가 나오면 여기에 보입니다.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기C99 CAN FD bit-timing library for Bosch M_CAN: finds exact settings, encodes NBTP/DBTP/TDCR with transmitter delay compensation. No heap, tested against the web calculator, CI with sanitizers.
저장소 README에서 가져옴
README 전체를 불러오는 중입니다.
README 전문 보기 ↗A small C99 library that finds CAN FD bit timings for Bosch M_CAN-style controllers, and encodes them into
the NBTP, DBTP and TDCR registers, including transmitter delay compensation. No dependencies, no heap,
one header. It is the C version of the calculator on
moutazm.com/projects/can-tools, and the tests check that both agree.
$ ./canfd-bt 40 500 80 2000 75
4 valid settings, best:
nominal brp 1 tq 80 = 1 + 63 + 16 sjw 16 sample point 80.00 %
data brp 1 tq 20 = 1 + 14 + 5 sjw 5 sample point 75.00 %
TDC on, TDCO = 15 clock cycles
M_CAN NBTP 0x1E003E0F DBTP 0x00800D44 TDCR 0x00000F00
Linux ip link set can0 up type can bitrate 500000 sample-point 0.800 dbitrate 2000000 dsample-point 0.750 fd on
For a CAN clock, a nominal and a data bit rate and two target sample points it:
m_can driver uses):
nominal prescaler 1–512, TSEG1 2–256, TSEG2 2–128; data prescaler 1–32, TSEG1 1–32, TSEG2 1–16;TDCO = data BRP × (1 + TSEG1) and says whether TDC is
allowed (ISO 11898-1: data prescaler 1 or 2 only);#include "canfd_bittiming.h"
cfd_setting best[3];
size_t n = cfd_solve(40000000u, 500000u, 0.80, 2000000u, 0.75, true, best, 3);
if (n) {
bool tdc = cfd_tdc_possible(&best[0].data);
uint32_t nbtp = cfd_mcan_nbtp(&best[0].nominal);
uint32_t dbtp = cfd_mcan_dbtp(&best[0].data, tdc);
uint32_t tdcr = cfd_mcan_tdcr(&best[0].data);
}
cfd_solve returns how many valid settings exist and writes the best max (up to 64) into your buffer, best
first. Pass NULL, 0 to only count.
make # libcanfd_bittiming.a + the canfd-bt command-line tool
make test # unit tests
CI builds with gcc and clang, -std=c99 -Wall -Wextra -Wpedantic -Wshadow -Wconversion -Werror, and runs the
tests again under AddressSanitizer and UndefinedBehaviorSanitizer. The reference cases in
tests/test_bittiming.c (prescalers, time quanta, segments, SJW, register values, TDCO, number of solutions) were
generated by the website's JavaScript, so a change in either one shows up as a failing test.
MIT