We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51123b4 commit a13d0a1Copy full SHA for a13d0a1
pycyphal/transport/can/media/pythoncan/_pythoncan.py
@@ -489,6 +489,8 @@ def _construct_pcan(parameters: _InterfaceParameters) -> can.ThreadSafeBus:
489
),
490
)
491
if isinstance(parameters, _FDInterfaceParameters):
492
+ if parameters.bitrate[0] == 0 or parameters.bitrate[1] == 0:
493
+ raise InvalidMediaConfigurationError("Bitrate must be non-zero")
494
# These magic numbers come from the settings of PCAN adapter.
495
# They don't allow any direct baudrate settings, you have to set all lengths and value of the main frequency.
496
# Bit lengths below are very universal and can be applied for almost every popular baudrate.
0 commit comments