Skip to content

Commit 48b18f1

Browse files
zariiii9003lumagi
andauthored
Unify bit timings with separate class for CAN FD (#1468)
* rework bit timings * fix pylint * convert config values to int * simplify instantiation from sample point * add docstrings * update bit timing docs and tests * fix wrong info * remove links * adapt CANalystIIBus * adapt CantactBus * try to set correct f_clock before raising exception * improve bit timing docs * turn `oscillator_tolerance` into function, improve `from_sample_point` * add tests * cleanup * Remove BitTimingFd Co-authored-by: Lukas Magel <[email protected]> * Update can/interfaces/cantact.py Co-authored-by: Lukas Magel <[email protected]> * Add test_btr_persistence suggestion Co-authored-by: Lukas Magel <[email protected]> * Format code with black * move imports up * undo type hint change * mention dict conversion in docs * change member order for docs * use bitrate prescaler as ground truth * avoid repetition * Add utility method to validate and adjust the timing clock value * Fix ZeroDivisionError * improve tests and docs * add deprecation period * check if "timing" already exists * add bit timing figure to docs Co-authored-by: zariiii9003 <[email protected]> Co-authored-by: Lukas Magel <[email protected]> Co-authored-by: Lukas Magel <[email protected]>
1 parent 3c7520e commit 48b18f1

14 files changed

+1901
-260
lines changed

can/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
from .interfaces import VALID_INTERFACES
3434
from . import interface
3535
from .interface import Bus, detect_available_configs
36-
from .bit_timing import BitTiming
36+
from .bit_timing import BitTiming, BitTimingFd
3737

3838
from .io import Logger, SizedRotatingLogger, Printer, LogReader, MessageSync
3939
from .io import ASCWriter, ASCReader

0 commit comments

Comments
 (0)